[R] contrasts error message in lm

A Serebrenik aserebre at win.tue.nl
Tue Jul 31 21:28:55 CEST 2007


Dear all,

I would like to find a linear regression model for a rather large dataset 
(27 independent variables). However, when I run lm the following error is 
reported:

> out <- lm(Result ~ AppealA + AppealsB + AppealC + AppealD + AppealE + 
Apply + ApplyAmount + Aprove + Closecase + Decidelocally + Healthassessment + 
HealthassessmentHealth + Postponedecision + Propertyassessment + PropertyassessmentPropertyvalue 
+ RejectA + RejectB + RejectC + RejectD + RejectE + Reportacceptance +
+ ReportrejectionA + ReportrejectionB + ReportrejectionC + ReportrejectionD +
+ ReportrejectionE + Timeout)

Error in `contrasts<-`(`*tmp*`, value = "contr.treatment") :
         contrasts can be applied only to factors with 2 or more levels


I've checked the documenation but somehow I fail to find an explanation 
what does it mean...

Thanks in advance,
Alexander Serebrenik



More information about the R-help mailing list