statable Statistics for study and research

Are my data nested in groups? (multilevel model)

In brief

The people belong to groups: children to classes, students to seminars, several measurements to one person. People in the same group are often more alike; ordinary tests assume independent values and then come out too optimistic. The multilevel model (mixed model) takes the groups into account. Statable calculates it with R (lme4, lmerTest). R is loaded once the first time (about 40 MB), afterwards it takes about a second; the data stay on the device.

  1. Choose the measure (a number).
  2. Choose the column that names the group (class, seminar, or the person for repeated measurements).
  3. Optional: characteristics of the people that could explain the differences.

If the measure has only two values (yes/no), Statable calculates a mixed logit model: odds ratios and a latent ICC; the event is the larger value.

In "Do groups differ?" and "Can something be predicted?" Statable points this out when there is a column such as "class" or an identifier with repetitions, and then opens the question already filled in. It is also under "More methods".

Reading the result

Requirements and limits

Multilevel model: ICC (null model) = .16; SES: b = 2.61, 95% CI [1.97, 3.25], t(688.8) = 8.01, p < .001; R²m = .17, R²c = .22 (N = 720 in 40 groups)

Typical examples

For specialists

lmerTest::lmer with REML (default as in jamovi and JASP), Satterthwaite degrees of freedom; the lmerTest package is shipped without its plotting functions (ggplot2), the calculation is unchanged. Random intercept per group; a random slope (number or column with two values) and centering at the grand mean are under "For specialists" in the result. R² after Nakagawa and Schielzeth (2013) with the extension for slopes after Johnson (2014), as performance::r2_nakagawa. Checked against R on the Mac: sleepstudy, MathAchieve (160 schools), class excerpt.

Related

Open in Statable