On Tue, 31 Jul 2007, A Serebrenik wrote: > 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...
So one of your 'variables' isn't: it is a factor with only one level? -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.