## linear polynomial
data(QoL)
space <- 1:10
mod1 <- grepolr(QoL~factor(Time)+factor(Treat),subjects="Patient",
data=QoL, categories=10, times=c(1,2,3),poly=1,space=space)
## cubic polynomial
mod3 <- grepolr(QoL~factor(Time)+factor(Treat),subjects="Patient",
data=QoL, categories=10, times=c(1,2,3),poly=3,space=space)
QIC(mod1)
QIC(mod3)
Run the code above in your browser using DataLab