Skip to content
Prev 74880 / 398502 Next

Convert numeric to factor

Hi,

I tried to do a logistic regression with polr(MASS). I
thought I already converted the response to factor,
but obvious I was wrong. Could anyone tell me what I
did wrong and how to correct it? Thank you very much!
as.integer(factor(Lease$EarlyTermination))
RegA=polr(ID~1+MSA+SIC.Code+TenantOption+LLOption+TOExercised,

+  data=Lease, method=c("logistic"))
Error in polr(ID ~ 1 + MSA + SIC.Code + TenantOption +
LLOption + TOExercised,  : 
        response must be a factor
Best,
Ed.
--- Jean Eid <jeaneid at chass.utoronto.ca> wrote: