← All posts

One Number Per Person: A Plain-Language Guide to the Whole Mixed-Models Series

Clinical Epidemiology ResearchMethodology and Research DesignUniqcret doctor knowledges
One Number Per Person: A Plain-Language Guide to the Whole Mixed-Models Series
On this page

Abstract

Repeated measurements from the same patient break ordinary regression, which quietly assumes every row belongs to an unrelated person. This guide retells the whole eight-post mixed-models series as one plain-language story, with almost no arithmetic. It opens with the idea that repairs the problem: each patient carries one personal number into every row they contribute, so correlation between repeated measurements follows from how the data were generated rather than from an option switched on in software. It then walks eight stops — the visible offset, compound symmetry and the intraclass correlation, conditional against marginal questions, the two-place map behind every model, random slopes, unequal variances, population-averaged alternatives, and the defence of four identical standard errors — linking each stop to the post that works it out in full.


One Number Per Person: Linear Mixed Models from the Ground Up — the series guide.

If you have arrived from a search engine, or from somewhere in the middle of the series, read this post first. The other eight posts each take one idea apart slowly and carefully. This one tells the whole story once, in ordinary clinical language, and ends every stop with a link so you can drop into the series wherever your own problem happens to live. Nothing here assumes you have fitted a mixed model before, and there is almost no arithmetic in it.

Every number in this series comes from simulated teaching data. It is not an empirical finding, it describes no real cohort, and it must not be cited as evidence about skin physiology.

The problem starts in a very ordinary clinic

You measure the same patient more than once. Both eyes. Four skin sites. Three blood pressures. A visit at baseline, at four weeks, at twelve weeks. The spreadsheet fills up, and each measurement gets its own row.

Ordinary linear regression reads that spreadsheet and makes one quiet assumption about it: every row is a fresh, unrelated patient. Two rows from the same person are treated as carrying exactly as much independent information as two rows from two people who have never met. In a repeated-measurements study that assumption is simply false, and it is false in a way you can usually see with your eyes — a patient who reads high tends to read high everywhere, and a patient who reads low tends to read low everywhere.

The consequence is not a vague "the analysis is a bit off". It is specific, and it does not go in one direction. When a comparison pools each patient's several rows, ignoring the structure makes the standard error far too small and the p-value far too impressive. When a comparison uses one row per patient, ignoring the structure costs almost nothing. When a comparison is made within a patient — this eye against that eye, this visit against that visit — ignoring the structure makes a genuinely precise comparison look imprecise. Thus a manuscript sentence such as "we adjusted for repeated measurements" tells a reader nothing useful, because it does not say which of those three situations the analysis was in.

The one idea that fixes it

Give every patient their own number.

Not a number the software invents, and not an adjustment applied to a row. One number, belonging to the person, added unchanged to every row that person contributes. If a patient's barrier runs leaky, that patient sits a fixed distance above the population profile at the forearm, at the hand, at the shin and at the back. Their own personal baseline travels with them into every measurement.

That is the whole of a random intercept. The word random does not mean arbitrary and it does not mean the software guessed; it means the patient's personal number is treated as a draw from a distribution across patients, rather than as eighty separate parameters to be estimated one by one.

Now watch what that single addition does. Because the same personal number is sitting inside every one of a patient's rows, those rows have something in common that rows from different patients do not have. That shared something is the correlation between repeated measurements. Nobody typed a correlation parameter, and no correlation structure was selected from a menu. Correlation is a consequence of the way the data were generated, not a switch the software was asked to flip.

Everything else in this series is a consequence of that one sentence.

Stop one — you can see the offset before you model anything

The opening post puts four simulated participants on the page and asks you to look at them before a single symbol appears. One participant sits above their group's expected profile at all four sites; another sits below at all four. That stubborn, repeating vertical gap is the personal number, visible in raw data. Three short lines of algebra then show that sharing one number between two rows contributes exactly its own variance to the covariance between them.

The post also delivers the first payoff. Because the personal offset is identical in both rows, it cancels exactly in a within-patient difference — so the model reports a smaller standard error for the within-patient comparison than for either of the two averages it is built from.

The Shared Offset: What a Random Intercept Really Is

Stop two — the pattern gets a name you already use

If one shared number creates the same amount of covariance between every pair of measurements, then the whole table of covariances between a patient's measurements is boring in a very useful way: the same value everywhere off the diagonal. That shape has a name, compound symmetry, and the ratio it produces has a name you already know from reliability work.

Ask what share of the total variability belongs to "which patient is this?" rather than to "which measurement is this?". That share is the intraclass correlation — in symbols, $\rho = \tau^2/(\tau^2+\sigma^2)$, where the first term is how much patients differ from one another and the second is how much one measurement wobbles around that patient's own profile. It is the same arithmetic a reliability study uses, doing a different job: here it is a description of clustering, not a measurement property of your instrument.

The practical consequence is the one every epidemiologist cares about. Repeated rows are not free. A dataset of several hundred rows carries the information of far fewer independent observations, and sample-size planning that ignores this may be badly optimistic.

Compound Symmetry and the ICC: One Offset, One Correlation

Stop three — the same model answers two different clinical questions

Here is where most confusion lives. A mixed model can say, without contradicting itself, both "these four measurements are independent" and "these four measurements are correlated". The two statements answer different questions.

The first question is: for this patient, whose baseline I already know, what do I expect at each site? Once the personal number is known, nothing links the four measurements any more, and they are independent. The second question is: for the next patient walking through the door, whose baseline I know nothing about, what do I expect? Now the personal number is unknown, it is free to be high or low, and it pulls all four measurements up or down together — so they are correlated.

The post works both versions out cell by cell on the same simulated participants, and shows that the personal number moves the covariance while leaving the average alone. Which of the two questions your protocol is asking is a decision you should make before you fit anything, not after you read the output.

Conditional or Marginal? Two Questions, One Mixed Model

Stop four — one equation contains all of it

At this point the series stops adding ideas and draws a map. Every linear mixed model ever fitted, however elaborate, says the same thing in two pieces: what the patient brings to the table, and what is left over afterwards. Written compactly, the covariance between a patient's measurements is $ZGZ' + R$ — the first term being everything generated by what the patient carries, the second being everything generated by ordinary measurement noise.

The value of the map is not the notation. It is that there are exactly two places where any modelling decision can act. You can enrich what the patient carries, or you can enrich what is left over. Once you can point at which of the two a proposed change touches, mixed-model output stops feeling like a list of unrelated options.

V = ZGZ′ + R: The One Equation Behind Every Mixed Model

Stop five — some patients differ in direction of travel, not only in level

A personal baseline says a patient sits higher or lower. It does not allow a patient to improve faster than another. In a follow-up study that is often the more interesting question, and the fix is to let each patient carry a second personal number: their own rate of change.

Two things follow immediately, and both are worth knowing before you type the syntax. The spread of the outcome stops being constant over time — it narrows and then widens again as the trajectories fan out. And the correlation between two visits starts to depend on which two visits you picked, rather than being one number for every pair. The tidy shape from stop two is gone the moment a personal slope enters.

The post also gives an honest account of the argument about how much personal structure to fit, and of what a "singular fit" warning is actually telling you.

Random Slopes: When Each Person Carries a Trajectory

Stop six — when one shared baseline is not the whole story

Most teaching stops at "a random intercept means every pair of measurements correlates equally". That is half right, and the missing half is where real datasets live.

A shared personal baseline forces the same covariance between every pair. It does not force the same correlation, because correlation also depends on how noisy each individual measurement is. If one measurement site is far more variable than the others — and in practice some are — then the covariances stay identical while the correlations spread out substantially. Compound symmetry is an assumption about two things, not one, and the second thing is the one people forget.

This post also explains why you cannot simply ask for everything at once. A covariance table of a given size holds only so many independent quantities; ask for more parameters than there are quantities to describe, and the model can no longer tell them apart. Convergence warnings and boundary estimates are usually this problem wearing a disguise.

When Compound Symmetry Is a Lie: Unequal Variances, Unstructured Correlation, and the Identifiability Ceiling

Stop seven — the other school: describe the correlation instead of explaining it

There is a second, entirely respectable family of models that declines to invent a personal number at all. It simply states what the correlation between a patient's measurements is, and gets on with estimating the treatment or group effect. GLS and GEE belong to this family.

For a continuous outcome the two families largely agree on the effect estimate, which is a mathematical coincidence rather than a general rule. For a binary outcome the coincidence breaks, and the same simulated truth yields two different odds ratios: a larger one that answers "for two patients alike in their underlying tendency, how much do their odds differ?", and a smaller one that answers "averaged over the whole population, how much do the odds differ?". Both are correct. They are answers to different questions, and reporting one while describing the other is a genuine reporting error.

Population-Averaged Alternatives: GLS, GEE, and Where the Linear Model's Luck Runs Out

Stop eight — saying it out loud, to a sceptical supervisor

The last post converts all of the above into one defensible paragraph and a four-step spoken answer, because a model you cannot explain at a meeting is a model you will end up abandoning.

Four Identical Standard Errors: Defending a Mixed Model in Front of Your Professor

The question that brings most people here: why is every standard error the same?

You fit the model in R or Stata, you look at the output, and the standard-error column shows the same number at every site. Standard errors normally differ from row to row. This one looks copied and pasted, and the natural first thought is that something is broken.

It is not broken. Here is the explanation in the plainest words the mathematics allows.

Start by separating three quantities that sound alike and are not. First, how spread out the raw measurements are at one site. Second, how spread out they still are after the model has accounted for the group profile and the patient's personal baseline. Third, how uncertain the estimated average at that site is — and it is only the third that appears in the standard-error column. Sites can easily differ on the first two without differing on the third.

Now ask what the uncertainty of a site average actually depends on. Two ingredients, and only two: how much variability a single measurement carries, and how many patients supplied one. The site's name is not an ingredient. It never enters the calculation.

In our simulated skin-measurement example, every patient was measured at every site, so each site average rests on exactly the same number of patients — and the model was asked for one shared noise level covering all sites, so each site average rests on exactly the same estimate of measurement variability. Same information, same recipe, same answer. Equal standard errors are not a duplicated cell; they are what the arithmetic requires.

Think of four opinion polls of identical size drawn from the same population on the same day. You would expect the same margin of error four times, and nobody would call that a software fault.

Equally, the equality is fragile in exactly the ways you would hope. Let twelve patients miss the measurement at one site and that site now rests on fewer patients — its standard error grows while the others do not move. Let each site have its own noise level instead of one shared one, and the standard errors separate even under perfect balance. Both changes are one line of code away, and both are honest.

One warning belongs here, and it is the part most defences get wrong. Identical standard errors are not a bug — but they are also not evidence that the shared-noise assumption was correct. Software computes uncertainty conditional on the assumptions it was handed, and legitimate output never validates the assumption that produced it. The way to settle the question is not rhetoric; it is a pre-specified sensitivity analysis in which the model is refitted with site-specific noise levels and you report precisely what changed and what did not.

The full defence, with the four-step script you can deliver out loud

What this guide does not license

Four cautions, because a short story is easy to over-read. First, a visible personal offset does not prove that a random intercept is the right structure for your data; it shows only that something person-level exists. Second, the personal number is not a biological measurement of your patient — it absorbs everything person-level that the model does not contain, and reading it as a clinical quantity would be a causal claim your design cannot support. Third, no random effect repairs a wrong mean structure: if an interaction belongs in your model and is left out, nothing in the random part will recover it. Finally, this guide is a map and not a defence — the arguments you would actually make to a reviewer live in the eight posts it points to.

Key takeaways

Where to start

Pick the entry point that matches your situation. If you have never fitted a mixed model, read stops one, two and three in order and stop there for now. If you arrived from a search about identical standard errors, read stop eight first and then stop one, because stop eight leans on it. If you are planning a repeated-measurements analysis, read stop four for the map and then whichever of stops five and six matches your design. If your problem is that a reviewer has questioned your estimand, go straight to stop seven.

Then do one concrete thing before your next model: plot every patient's own profile across their repeated measurements, and name the contrast your research question actually needs. Those two steps cost a few minutes, and they decide most of what follows.

The series, in order

  1. The Shared Offset: What a Random Intercept Really Is
  2. Compound Symmetry and the ICC: One Offset, One Correlation
  3. Conditional or Marginal? Two Questions, One Mixed Model
  4. V = ZGZ′ + R: The One Equation Behind Every Mixed Model
  5. Random Slopes: When Each Person Carries a Trajectory
  6. When Compound Symmetry Is a Lie: Unequal Variances, Unstructured Correlation, and the Identifiability Ceiling
  7. Population-Averaged Alternatives: GLS, GEE, and Where the Linear Model's Luck Runs Out
  8. Four Identical Standard Errors: Defending a Mixed Model in Front of Your Professor
0
Message for International and Thai ReadersUnderstanding My Medical Context in ThailandRead more →Message for International and Thai ReadersUnderstanding My Broader Content Beyond MedicineRead more →

Comments

No comments yet. Be the first to share your thoughts.

Sign in to comment