Repeated Measures and Mixed Models

Use this page to decide when repeated-measures analysis is needed, which outputs Licklider returns for repeated data, and where the current implementation still has limits.

Repeated measures data occurs when the same subject, animal, or sample is measured more than once — across time points, across conditions, or both. Because observations from the same subject are correlated, they cannot be treated as independent. Standard group comparisons assume independence and are not appropriate for repeated measures designs.

This page describes the analysis approaches available in Licklider for repeated measures data, what outputs they produce, and when each applies.


Two time points: paired analysis

When the same subjects are measured at exactly two time points or in two conditions, the appropriate analysis is a paired test:

  • Paired t-test — when the differences are approximately normally distributed
  • Wilcoxon signed-rank test — when normality cannot be assumed

Licklider selects the appropriate paired test automatically when subject IDs are consistent across two conditions. For more detail on pairing → see Paired vs Unpaired Guard.

For this two-time-point path, the result is a paired-test output rather than a mixed-model table: expect a paired test statistic and p-value, plus the paired interpretation workflow described on the underlying test pages.

Licklider cannot always detect repeated structure from values alone. If subject IDs are missing, inconsistent, duplicated incorrectly, or collapsed before upload, Licklider may not be able to confirm that rows belong to the same subject. In that situation, a repeated design can be misread as independent data and the resulting inference can be too optimistic.


Three or more time points: available approaches

For three or more repeated measurements, two approaches are currently available in Licklider:

Friedman test

A non-parametric test for repeated measures with three or more time points. It does not assume normality and is appropriate when the within-subject differences cannot be assumed to be normally distributed.

The Friedman test evaluates whether the outcome differs across time points. It does not model the trajectory or account for covariates. In the current product, this path is best understood as a rank-based omnibus repeated-measures test: it tells you whether a within-subject time effect is detectable, not which timepoints differ or how large a subject-specific trajectory is.

For Friedman, readers should expect an omnibus repeated-measures result centered on the test statistic and p-value rather than a coefficient table.

GLMM with a random intercept

A generalized linear mixed model that includes a random effect for subject. The random intercept accounts for the correlation between repeated observations from the same subject.

GLMM is more flexible than Friedman: it can include covariates, handle unbalanced designs (subjects with different numbers of observations), and model both Gaussian and binomial outcomes. In Licklider's current GLMM path, the returned output includes fixed-effect coefficients, standard errors, test statistics, p-values, 95% confidence intervals, convergence status, and numerical warnings as documented on the GLMM page.

To request a GLMM, specify the subject ID column and the analysis structure in the Chat:

  • "Fit a mixed model with subject as a random effect"
  • "Use a GLMM to account for repeated measures"

For more detail on the GLMM implementation → see GLMM: Gaussian and Binomial.

The reason these two approaches sit side by side is practical as well as statistical: Friedman covers the simple non-parametric repeated-measures question when you want a rank-based omnibus test, while GLMM covers the more model-based setting where correlation structure, covariates, missingness patterns, or non-Gaussian outcomes matter [1, 2, 3].


What is not currently available

A dedicated repeated-measures ANOVA (rmANOVA) with sphericity testing (Mauchly's test) and Greenhouse-Geisser or Huynh-Feldt correction is not currently implemented. If your analysis requires a classical rmANOVA, the GLMM with a random intercept is the closest available alternative and is often the more defensible approach when observations are unbalanced or missingness occurs, because mixed models do not rely on the same complete-case and sphericity framing as classical rmANOVA [2, 3].


Choosing between Friedman and GLMM

FriedmanGLMM
Assumes normalityNoGaussian: yes; Binomial: no
Handles covariatesNoYes
Handles unbalanced dataNoYes
Binary outcomeNoYes (Binomial family)
OutputOmnibus repeated-measures test statistic and p-valueCoefficients, standard errors, confidence intervals, convergence status, and warnings

Use Friedman when you want a non-parametric test and do not need to adjust for covariates or handle unbalanced data. Use GLMM when the design is complex or when you need to model the outcome with covariates.

If your scientific question is primarily "does anything change across repeated conditions?" and your design is simple and complete, Friedman is usually the clearer summary. If your question involves predictors, unequal follow-up, missing visits, or a binary outcome, GLMM is the more appropriate path because it models the dependence structure directly rather than reducing the design to a rank-based omnibus test [2, 3].


What this page does not cover


Design Rationale & References

Licklider's design choices

Licklider separates the repeated-measures guidance into a simple paired path, a rank-based Friedman path, and a mixed-model path because these answer different study questions. A paired test is sufficient when exactly two matched observations are available per subject. Friedman is retained for the common non-parametric repeated-measures case where readers want a distribution-light omnibus test without adding covariates [1]. GLMM is recommended when the design becomes more realistic and irregular: repeated observations may be incomplete, outcomes may be binary, and subject-level correlation needs to be modelled explicitly rather than handled as a correction layered on top of an ANOVA table [2, 3].

Licklider currently points repeated-measures users toward a random-intercept GLMM rather than promising a full rmANOVA workflow because the random-intercept model directly represents subject-level dependence and remains usable when follow-up is unbalanced. That does not make it a drop-in replacement for every repeated-measures design: if subject-specific slopes are scientifically important, the current page should be read as a boundary, not as a claim that all longitudinal structure is fully captured.

Methodological foundations

  1. Friedman, M. (1937). The use of ranks to avoid the assumption of normality implicit in the analysis of variance. Journal of the American Statistical Association, 32(200), 675-701.

    → The classical foundation for the Friedman test as a rank-based repeated-measures alternative when normal-theory assumptions are not appropriate.

  2. Laird, N. M., & Ware, J. H. (1982). Random-effects models for longitudinal data. Biometrics, 38(4), 963-974.

    → A foundational reference for using random-effects models to represent correlated repeated observations within subjects.

  3. Gueorguieva, R., & Krystal, J. H. (2004). Move over ANOVA: progress in analyzing repeated-measures data and its reflection in papers published in the Archives of General Psychiatry. Archives of General Psychiatry, 61(3), 310-317.

    → Explains why mixed-model approaches are often preferable to classical repeated-measures ANOVA in realistic longitudinal data settings.

Implementation boundaries

  • Licklider can sometimes use subject IDs to route a two-condition repeated design toward a paired analysis, but it cannot guarantee perfect repeated-structure detection from the uploaded table alone.
  • If subject IDs are missing, inconsistent, or summaries were uploaded instead of per-subject rows, Licklider may not be able to distinguish repeated measures from independent observations. That can make p-values look more convincing than they should.
  • The current guidance page does not promise a dedicated rmANOVA workflow with sphericity tests or Greenhouse-Geisser or Huynh-Feldt corrections.
  • The GLMM path documented here is a random-intercept path. Random slopes and richer covariance structures are not described as current outputs on this page.
  • Use the linked design-and-independence checks when you need help deciding whether the data really supports an independent, paired, or mixed-model analysis.