Diana Marcela Martinez Ruiz
2012-Jun-30 00:22 UTC
[R] Help with the proportional odds model (Colombia)
Good evening, I'm trying to mount the proportional odds model (ordinal polytomous regression model) and most of my independent variables are qualitative (and are transformed into dummy). I have an inconvenience that I would like to help me resolve, below I present part of the code I'm developing for fitting the model (The variables included here are only for trial, because I have many more independent variables): 1) Muestra.comp.multi<-svydesign(id=~b.multi,strata =~d.multi,nest=TRUE,weights=~c.multi,data=acm18.multi,fpc=~e.multi, mealcat=cut(meals,c(0,25,50,75,100))) (This is the first complex sample) * Muestra.comp.multi<-update(Muestra.comp.multi,APES=APES,EDAD_1=Edad_1,EDAD_2=Edad_2) # Corresponds to a transformation that you suggested me 2) mod.polti.ultico<-svyolr(APES~EDAD_1,EDAD_2,design=Muestra.comp.multi,method=c("logistic")) And this is the error that comes out (I could help resolve this error, please): Error en svyolr.survey.design2(APES ~ EDAD_1, EDAD_2, design = Muestra.comp.multi, : response must be a factor Thank you very much for your help. [[alternative HTML version deleted]]