if (FALSE) {
data(alevchem, package = "R2MLwiN")
alevchem$gcseav <- alevchem$gcse_tot/alevchem$gcse_no - 6
# Note: Establishment codes on their own do not uniquely identify schools.
# Schools are instead uniquely identified by LEA code, establishment ID
# combination. Thus, here we generated a unique school ID.
alevchem$school <- as.numeric(factor(paste0(alevchem$lea, alevchem$estab)))
(mymodel <- runMLwiN(logit(a_point, cons, 6) ~ 1 + gcseav[1:5] + I(gcseav^2)[1:5] +
gender[1:5] + (1[1:5] + gcseav[1:5] | school),
D = "Ordered Multinomial", estoptions = list(EstM = 1), data = alevchem))
}
Run the code above in your browser using DataLab