Direct comparison
Random Intercepts vs. Random Slopes
Random intercepts give groups their own baseline; random slopes let an effect vary by group too. When each is justified, and the real cost of adding one.
Written and maintained by CASRAI Editorial Board
Last updated
Ask CASRAI · included with Regulatory Radar
Ask about Random Intercepts vs. Random Slopes
Ask CASRAI answers research-administration questions and cites the passages behind every claim — and says so when the corpus does not cover something, instead of guessing. It comes with a Regulatory Radar subscription at $29 a month, alongside the daily digest of regulatory changes and the dashboard of what changed.
150 questions a day, on this site, over the API, or inside your own tools through the CASRAI MCP server.
Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays free to read, with no account and no card.
How do Random Intercept Only, Random Intercept + Random Slope compare side by side?
The table below compares Random Intercept Only, Random Intercept + Random Slope across 9 procurement-relevant dimensions, from what varies by group through typical software default.
Side-by-side comparison
| Dimension | Random Intercept Only | Random Intercept + Random Slope |
|---|---|---|
| What varies by group | Only the group's baseline (starting) level of the outcome. | The group's baseline AND the strength/direction of a chosen predictor's effect. |
| lme4 syntax (R) | (1 | group) | (1 + x | group) — correlated intercept/slope by default; (1 + x || group) forces them uncorrelated. |
| Parameters added per random effect | One variance component (intercept variance). | Three: intercept variance, slope variance, and the intercept–slope correlation (two if fit uncorrelated). |
| Minimum data to estimate reliably | Works with as few as 2 observations per group. | Needs enough within-group observations across enough distinct values of the predictor to estimate a group-specific trend — a handful of groups or one observation per group at a single predictor value cannot support it. |
| When it is the right call | Groups plausibly differ in overall level, but there is no reason to think a predictor's effect itself differs by group (e.g., patients differ in baseline severity, but the drug is assumed to work the same way for everyone). | The research question is partly ABOUT whether an effect varies by group, or the study design repeats the same predictor manipulation within each group (e.g., a within-subjects experiment, or a treatment effect that plausibly differs by clinic). |
| Effect on the fixed-effect standard error | Corrects standard errors for within-group correlation in the outcome level only. | Also corrects for the fact that the sample's average slope is itself only one draw from a distribution of group-level slopes — omitting a needed random slope is a well-documented source of anti-conservative (too-small) standard errors and inflated Type I error on that predictor's fixed effect. |
| Convergence / singular-fit risk | Low — a single variance component is usually well-identified even with modest data. | Higher — the extra variance and correlation parameters are a common source of "boundary (singular) fit" warnings when there is too little data per group to support them; the standard response is to simplify (drop the correlation term, or drop the random slope) rather than ignore the warning. |
| How to decide statistically | Baseline model. | Fit both models with ML (not REML) and compare via a likelihood-ratio test, or use a model-selection criterion (AIC/BIC) — Matuschek et al. (2017) showed that always including the theoretically maximal structure ("keep it maximal," per Barr, Levy, Scheepers & Tily 2013) can cost real power on typical datasets, and recommend a data-justified structure instead. |
| Typical software default | Often the starting point researchers reach for first, sometimes under-specifying a design that actually needs a random slope. | Not fit unless explicitly specified — no mainstream package adds a random slope automatically. |
Common questions
Common questions about Random Intercept Only vs Random Intercept + Random Slope
What is the actual difference between a random intercept and a random slope?
+
A random intercept lets each group have its own baseline value for the outcome while assuming every predictor affects all groups identically. A random slope lets a specific predictor's effect itself differ from group to group — for example, letting a treatment's effect on symptom score vary from clinic to clinic, not just letting clinics differ in starting severity.
Do I need a random intercept before I can add a random slope?
+
In standard practice, yes — a random slope for a predictor is specified in addition to a random intercept for the same grouping factor, not as a substitute for it. Fitting a random slope without a random intercept is possible in most software but is rarely the right model: it forces every group's regression line through the same starting point, which is usually not a realistic assumption.
How do I know if my design needs a random slope?
+
Two questions: does the predictor vary WITHIN each group (a between-group-only predictor cannot have a meaningful random slope), and is there a substantive reason to expect its effect differs by group? If both are yes and you have enough within-group data to estimate it, a likelihood-ratio test (fit with ML) or AIC/BIC comparison against the random-intercept-only model is the standard way to decide.
Why did adding a random slope produce a singular-fit warning?
+
A singular or boundary fit means the data can't support the extra variance and correlation parameters a random slope adds — typically because there are too few groups, too few observations per group across the predictor's range, or the true group-to-group variation in that effect is genuinely close to zero. The fix is to simplify the random-effects structure (drop the intercept-slope correlation term, or drop the random slope itself), not to publish the model with the warning unresolved.
Should I always fit the "maximal" random-effects structure recommended by Barr et al. (2013)?
+
Not automatically. Barr, Levy, Scheepers & Tily (2013) argued for including every random slope the design justifies, to keep Type I error at its nominal rate. Matuschek et al. (2017) showed this can cost substantial statistical power on typical datasets and demonstrated that a data-justified (reduced, model-selected) structure often balances Type I error and power better than the maximal structure by default. Treat "maximal" as a starting point to test against simpler alternatives, not a rule to apply unconditionally.
Going deeper








