TABLE 2.
Implementation in R | |||||
---|---|---|---|---|---|
Outcome data type | Example in DBER | Regression type (R function) | With random effect (R function) | R package | R syntax |
Continuous | Exam points | Linear model (lm) | Linear mixed effects model (lmer) | lme4b | Mod ← lmer(outcome ∼ predictor, data = data) |
Binary (0/1; yes/no) | Pass/fail | Binomial (glm) | Generalized linear mixed effects model (glmer) | lme4b | Mod ← glmer(outcome ∼ predictor, family = binomial, data = data) |
Proportion | Proportion of classes attended | Binomial (glm, family = binomial) | Generalized linear mixed effects model (glmer) | lme4b | Mod ← glmer(cbind(numerator, denominator) ∼ predictor, family = binomial, data = data) |
Count | Number of hand-raises | Poisson (glm, family = Poisson) | Generalized linear mixed effects model (glmer) | lme4b | Mod ← glmer(outcome ∼ predictor, family = Poisson, data = data) |
Likert; categorical ordinal | Agree–neutral–disagree | Proportional odds or ordered logit (polr) | Cumulative link mixed model (clmm) | ordinalc | Mod ← clmm(as.factor(outcome) ∼ predictor, data = data) |
aSome of the most common types of discipline-based education research (DBER) outcome variables can be categorized as continuous, binary, proportion, count, or on a Likert scale. This table shows the most common types of data in DBER and the corresponding implementation of multilevel models in R, including a recommended R package and corresponding syntax for model specification.