Re: [R] Error in ordinal mixed effects

2020-06-09 Thread Jim Lemon
Hi Susana, I ran your code on a fake data frame: datos<-data.frame(id=paste0("s",1:65), group=c(rep("control",30),rep("treat",35)), cannabis0=sample(1:5,65,TRUE), cannabis6=sample(1:5,65,TRUE), cannabis9=sample(1:5,65,TRUE), cannabis12=sample(1:5,65,TRUE), cannabis18=sample(1:5,65,TRUE)) tim

Re: [R] Error in ordinal mixed effects

2020-06-09 Thread Michael Dewey
Dear Susana Without your dat it is hard to say (and it would have helped to know where mixor() comes from) but this almost always means that ne of your parameters to the call is not what you thought it was so trying str(res) might be enlightening. Also I do not see anywhere in your example wh

Re: [R] Error in ordinal mixed effects

2020-06-09 Thread Bert Gunter
Not sure, and we don't have your data, datos, but this is almost always a bad thing to do: res<-data.frame(cbind(id, group, time, cannabis)) Change it to: res<-data.frame(id, group, time, cannabis) ## and you then won't need to name them either and see if that fixes things. Also, res$id is prob

Re: [R] Error in ordinal mixed effects

2020-06-09 Thread Jeff Newmiller
Can't tell... example is not reproducible because it is missing "datos'. On June 9, 2020 4:33:24 AM PDT, SUSANA ALBERICH MESA wrote: >Hi, >I'm trying to run an ordinal mixed effects model with Mixor command. I >have 65 cases and repeated visits in 0, 6, 9, 12 and 18 months. My code >is the follo

[R] Error in ordinal mixed effects

2020-06-09 Thread SUSANA ALBERICH MESA
Hi, I'm trying to run an ordinal mixed effects model with Mixor command. I have 65 cases and repeated visits in 0, 6, 9, 12 and 18 months. My code is the following: cannabis<-c(datos$cannabis0, datos$cannabis6, datos$cannabis9, datos$cannabis12, datos$cannabis18) time<-c(rep(0, 65), rep(6, 65),