[R] Inverse prediction with R?

Kaspar Pflugshaupt pflugshaupt at geobot.umnw.ethz.ch
Tue Feb 22 11:46:30 CET 2000


Hello,

after some searching in the mailing list archives, R-Help and S-Plus-Help, I
dare asking the question here: How can I do inverse prediction from a lm
model with R?
What I want to achieve is this: predict term values for given new response
values. If I've got a model

t.m<-lm(y—x)

I would type something like

inverse.predict(t.m, newdata=data.frame(y=1:10))

which would give me new corresponding x values. If it returned confidence
intervals as well, I'd be in heaven :-)

All I have found is "terms prediction" in the predict.lm routine, which does
not seem to heed the "newdata=" argument and returns predicted values for
the locations that the model was built from. There seems to be no way to get
confidence intervals for those predictions, either. Moreover, the returned
values are  centered and scaled somehow that I don't understand. The help
file was a bit too terse for me.

Can I use the predict.lm function for my problem, or would I have to
implement the real thing myself? I've got a formula (from Zar,
Biostatistical Analysis), but it would take me some time and work.

Thanks (and I hope I made myself clear)

Kaspar

-- 

Kaspar Pflugshaupt
Geobotanisches Institut
Zuerichbergstr. 38
CH-8044 Zuerich

Tel. ++41 1 632 43 19
Fax  ++41 1 632 12 15

mailto:pflugshaupt at geobot.umnw.ethz.ch
privat:pflugshaupt at mails.ch
http://www.geobot.umnw.ethz.ch

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list