[R] Running a Logit Model in R
Mathew, Abraham T
amathew at ku.edu
Sun Jan 31 02:24:52 CET 2010
I'm an R newbie and had the following question. I'm trying to run a logit model because I have a dependant variable that is a factor with three levels. Each of my independent variables are factor variables and have two or more levels, which is why I'm unsure about the error.
regone <- glm(data96$RV961327 ~ data96$RV960605 + data96$RV960610 + data96$RV960337 + data96$RV960385 + data96$RV960417 + data96$RV960615 + data96$RV960698 + data96 $RV960714 + data96$RV961145 + data96$RV960067 + data96$RV960702, family=binomial(logit))
This produces the following error.
Error in `contrasts<-`(`*tmp*`, value = "contr.treatment") :
contrasts can be applied only to factors with 2 or more levels
Help,
Abraham M.
More information about the R-help
mailing list