[R] predicting values from multiple regression
Anna Lee
ana-lee at web.de
Sun Mar 20 19:54:33 CET 2011
Hey List,
I did a multiple regression and my final model looks as follows:
model9<-lm(calP ~ nsP + I(st^2) + distPr + I(distPr^2))
Now I tried to predict the values for calP from this model using the
following function:
xv<-seq(0,89,by=1)
yv<-predict(model9,list(distPr=xv,st=xv,nsP=xv))
The predicted values are however strange. Now I do not know weather
just the model does not fit the data (actually all coefficiets are
significant and the plot(model) shows a good shape) or wether I did
something wrong with my prediction command. Does anyone have an
idea???
--
Thanks a lot, Anna
More information about the R-help
mailing list