Models
Regression models
Regression estimates how an outcome changes with predictors.
- A simple treatment effect — one predictor (condition) recovers the contrast Estimation describes.
- Adding predictors — control for covariates or test multiple factors at once.
- Interactions — when the effect of one factor depends on another (e.g., a manipulation works for one group but not another).
- When does linear regression work? When relationships are approximately linear and errors well-behaved; otherwise transform or use a different model.
Generalized linear models (GLM)
When the outcome isn't continuous (binary choice, count, reaction-time-in-seconds), a GLM pairs linear prediction with an appropriate link and error family—logistic regression for yes/no, Poisson for counts.
Linear mixed-effects models (LMM)
Experiments cluster data: participants do many trials; items are seen by many participants.
- Modeling random variation in clusters — random intercepts let each participant or item deviate from the mean.
- Random slopes — let the effect size vary by participant/item. Powerful but harder to estimate; requires enough data per cluster.
How do you use models to analyze data?
- When to include covariates — adjust for variables correlated with the outcome to reduce noise and bias, but don't fish for the specification that "works."
- Robustness checks and the multiverse — show the conclusion holds across reasonable model choices. A "multiverse analysis" displays results across many defensible analytic paths, exposing how fragile a finding is.
Key terms
- Fixed effect — a population-level parameter you estimate.
- Random effect — variation across clusters (participants/items) treated as a distribution.
- Multiverse analysis — reporting results across many reasonable analytic specifications.
Further reading
- Next (Part 3): Measurement
- Clustered sampling: Sampling
- Modeling — models as representations of psychological processes.
- Inferential Statistics — the underlying tests.
- N-back Task — repeated-trials data suited to mixed models.