Description Usage Format Details Source Examples
A data set for studying nested random factors.
| 1 | 
A data frame with 1000 observations on the following 4 variables.
schoola factor with 20 levels
classa factor with 5 levels
gendera factor with levels female male
scorea numeric vector
A simulated data set with 20 schools, each with 5 classes with 10 kids. The parameters: variance among schools (100), variance among classes (50), residual variance (10), factor gender: level female (120), level male (80).
| 1 2 3 4 5 | data(schoolclass)
str(schoolclass)
#
# with library(lme4)
# (m0 <- lmer(score ~ gender + (1|school/class), data=schoolclass))
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.