This package provides a function mixor
for fitting mixed-effects ordinal and binary response models and associated methods for printing, summarizing, extracting estimated coefficients and the variance-covariance matrix, and estimating contrasts for the fitted models.
mixor
mixor
This package provides a function mixor
for fitting mixed-effects ordinal and binary response models and associated methods for printing, summarizing, extracting estimated coefficients and the variance-covariance matrix, and estimating contrasts for the fitted models.
Hedeker D. and Gibbons R.D. (1996) A computer program for mixed-effects ordinal regression analysis. Computer Methods and Programs in Biomedicine 49, 157-176.
See also mixor
, and examples in norcag
, irt.data
, concen
, SmokeOnset
, schizophrenia
# NOT RUN {
library("mixor")
data("SmokingPrevention")
# data frame must be sorted by id variable
SmokingPrevention<-SmokingPrevention[order(SmokingPrevention$class),]
# school model
Fitted.school<-mixor(thksord~thkspre+cc+tv+cctv, data=SmokingPrevention,
id=school, link="logit")
summary(Fitted.school)
vcov(Fitted.school)
# students in classrooms analysis
Fitted.students<-mixor(thksord~thkspre+cc+tv+cctv, data=SmokingPrevention,
id=class, link="logit", nAGQ=11)
summary(Fitted.students)
coef(Fitted.students)
vcov(Fitted.students)
cm<-matrix(c(-1,-1,-1,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,1,0,0,0,1),
ncol=3,byrow=TRUE)
Contrasts(Fitted.students, contrast.matrix=cm)
# }
Run the code above in your browser using DataLab