# NOT RUN {
# make sure social is a factor:
cldata<-within(cldata, social<-factor(social))
# we define the data frame with all the variables
data<-cldata[,c("measure","age", "social", "city")]
# And the formula of the substantive lm model
# social as an outcome only because it is the only ordinal variable in the dataset...
formula<-as.formula(social~age+measure+(1|city))
#And finally we run the imputation function:
# imp<-jomo.clmm(formula,data, nburn=1000, nbetween=1000, nimp=2)
# Note the function is commented out to avoid time consuming examples,
# which go against CRAN policies.
# Check help page for function jomo to see how to fit the model and
# combine estimates with Rubin's rules
# }
Run the code above in your browser using DataLab