[R] Error in a regression

Jim Lemon drjimlemon at gmail.com
Tue Oct 25 04:44:01 CEST 2016


Hi Andrea,
Assuming that your model is something like:

lm(y~x,data=mydata)

See what:

cor(mydata$y,mydata$x)

returns. If it is very very close to 1 or -1, there lies your problem.
If one or more of your predictor variables is an almost perfect
predictor of the response, you don't have much room to select
different models.

Jim



More information about the R-help mailing list