schoolclass: Schools and Classes

Description Usage Format Details Source Examples

Description

A data set for studying nested random factors.

Usage

1

Format

A data frame with 1000 observations on the following 4 variables.

school

a factor with 20 levels

class

a factor with 5 levels

gender

a factor with levels female male

score

a numeric vector

Details

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).

Source

thomas.fabbro@unibas.ch

Examples

1
2
3
4
5
data(schoolclass)
str(schoolclass)
#
# with library(lme4)
# (m0 <- lmer(score ~ gender + (1|school/class), data=schoolclass))

asuR documentation built on May 2, 2019, 4:50 p.m.

Related to schoolclass in asuR...