Why Separate the Two Sources of Variation?
A time-varying predictor can differ across people and can also change within the same person. Those are distinct sources of information. For example, a person with higher average activity than others may differ in health for reasons that are not the same as the reasons that a particular person has better health during more-active-than-usual periods. A single coefficient for the uncentered predictor can blend these associations.
In longitudinal imputation, this distinction matters because a conditional model that preserves only one association can distort the other. The decomposition below gives a direct way to represent both. It does not itself specify a complete imputation model: the other predictors, time structure, outcome type, and uncertainty treatment must still be appropriate to the analysis.
Here \(T_i\) is the number of occasions included in the specified mean. For a balanced schedule it is common to use the same scheduled occasions for every person. With unbalanced follow-up, the occasions and weighting rule need to be stated: a mean over observed visits is not automatically comparable to a mean over a fixed set of scheduled visits. The person mean is not an intrinsically stable trait; it summarizes the chosen measurement window.
Modeling the Two Associations
A basic model for an outcome \(Y_{it}\) can include both components:
In this expression, \(Z_i\) is a person-level covariate and \(t\) denotes the time variable or time terms specified for the analysis. A multilevel model may additionally represent dependence among observations from the same person. The two coefficients have different comparisons: \(\beta_W\) describes the expected outcome difference associated with a one-unit occasion-specific increase in \(X\), relative to that person’s own mean, holding the included terms fixed. \(\beta_B\) describes the expected outcome difference associated with a one-unit difference in person means, comparing people at the same within-person deviation and included covariates.
These are conditional associations, not causal effects by virtue of the decomposition. A causal interpretation would require additional design and confounding assumptions. The linear specification also assumes that the conditional mean is adequately represented by the stated terms; nonlinearities or interactions may be needed for a particular application.
Worked Example: Calculating Person Means and Deviations
Suppose a hypothetical participant’s activity score is recorded on four scheduled occasions as 10, 12, 14, and 16 units. Calculate the person mean and each within-person deviation.
The mean is \( \bar{X}_i=(10+12+14+16)/4=52/4=13 \) units. Subtract 13 from each occasion value. The deviations are \(10-13=-3\), \(12-13=-1\), \(14-13=1\), and \(16-13=3\) units. They sum to zero: \(-3-1+1+3=0\), as they must when every occasion in the mean is included.
A deviation of 3 means this occasion’s score is 3 units above this participant’s four-occasion average. It does not mean the participant is 3 units above another participant, and it is not a change from the immediately preceding visit.
Why the Decomposition Separates Variation
The decomposition has a useful algebraic property. For each person, the deviations sum to zero:
The final equality follows from the definition of \(\bar{X}_i\). Thus, within each person, the deviations describe departures around the person mean rather than a second copy of the person’s overall level. This is the algebraic basis for interpreting the two terms separately. It does not guarantee that their estimated coefficients will be precise; little within-person variation or few people can still produce substantial uncertainty.
The distinction can also be seen by rewriting the model. Since \(X^{W}_{it}=X_{it}-\bar{X}_i\), a model with both components is equivalent to
Consequently, in a model using raw \(X_{it}\) and \(\bar{X}_i\), the coefficient of raw \(X_{it}\) is the within-person association, while the coefficient of \(\bar{X}_i\) is the difference between the between-person and within-person associations. This latter quantity is often called the contextual effect. It is not the between-person association itself.
Worked Example: Interpreting Distinct Associations
In a hypothetical study, an outcome is measured in points and an activity predictor in hours per week. A fitted model is \(E(Y_{it})=50+2.4X^{W}_{it}+1.1\bar{X}_i\), with other model terms held fixed. Interpret the two slopes.
The within-person coefficient is 2.4 outcome points per additional hour per week above a person’s own mean. For the same person, an occasion 1 hour per week above their mean is associated with an expected outcome 2.4 points higher than an occasion at their mean, conditional on the model terms.
The between-person coefficient is 1.1 outcome points per 1-hour-per-week difference in person mean, comparing people whose occasion-specific deviations are equal. For example, a 3-hour-per-week difference in person means corresponds to \(3(1.1)=3.3\) expected outcome points under the model.
These coefficients are not interchangeable. A comparison of two people with different averages is not the same comparison as a change within one person. Neither interpretation establishes that increasing activity causes an outcome change.
Carrying the Decomposition Through MICE
When \(X_{it}\) has missing values, its person mean and deviations are derived quantities. In a multiply imputed data set, calculate them from that completed data set, using the same definition of occasions and weights for every imputation. If an imputed value changes, the mean and all deviations for that person may change. Treating the derived values as fixed from the incomplete data would fail to reflect the completed predictor values and could break the identity \(X_{it}=\bar{X}_i+X^{W}_{it}\).
This creates an important modeling issue: the person mean of \(X\) cannot simply be treated as an ordinary, independent predictor when imputing \(X\) itself. It is calculated from \(X\), including the value being imputed. A practical strategy is to impute the repeated values using a conditional model that represents relevant person-level and within-person information, then calculate the means and deviations passively in each completed data set before fitting the substantive model. Another strategy parameterizes a suitable conditional model directly in terms of within- and between-person components. In either case, the conditional models must be defensible for the variables and analysis at hand, and the imputation procedure must propagate parameter and missing-value uncertainty.
Worked Example: Updating Derived Terms After Imputation
Consider four scheduled activity values for a hypothetical participant: 2, 4, missing, and 8 units. Suppose one completed imputed data set assigns 6 units to the missing occasion. Calculate the completed-data mean and deviations, and compare them with what would happen if the mean were incorrectly frozen at its observed-value mean.
The completed-data mean is \( \bar{X}_i=(2+4+6+8)/4=20/4=5 \) units. The deviations are \(-3,-1,1,3\) units, which sum to zero. The imputed value is therefore 1 unit above this participant’s completed-data mean.
If the observed-only mean were used instead, it would be \( (2+4+8)/3=14/3=4.667 \) units. Subtracting that frozen value from the four completed values gives deviations \(-2.667,-0.667,1.333,3.333\), whose sum is 1.333 rather than zero. Those are not deviations around the completed-data mean. The calculation illustrates why the derived terms must be recomputed within each imputed data set. It does not imply that the observed-only mean is never useful; it is simply a different quantity from the completed-data mean defined for this analysis.
Define the person’s analysis window, occasions, and any weighting rule before deriving the person mean.
Use conditional models that reflect relevant time and person-level structure; do not use a person mean containing the unknown value as though it were an independent observed predictor.
For each completed data set, recalculate \(\bar{X}_i\) and \(X^{W}_{it}\) from the completed values, then fit the analysis model containing both components.
Verify that each deviation equals \(X_{it}-\bar{X}_i\), that deviations sum to zero over the defined occasions, and that the fitted model matches the intended within- and between-person interpretation.
Assumptions, Diagnostics, and Alternatives
The decomposition is an identity once the mean definition is fixed. Its use in an analysis or imputation model, however, relies on substantive and modeling choices. The analysis must have repeated predictor measurements for the within-person association to be identified, and there must be enough variation within people to estimate it. The person mean should represent a meaningful comparison over the chosen occasions. If follow-up differs substantially between people, a mean based on each person’s observed visits may mix differences in exposure with differences in visit schedules.
For MICE, the missingness assumptions must be considered conditional on the variables included in the imputation models; the decomposition does not make missingness ignorable. Imputation models should preserve associations needed by the analysis, account for relevant temporal structure, and represent the predictor’s measurement scale appropriately. A linear conditional model for a bounded or categorical predictor may be unsuitable. The analysis model and imputation model also need to be sufficiently compatible: generating plausible values alone is not enough if important within- or between-person associations are lost.
Useful checks include reviewing the distribution of person means and deviations across imputations, checking that variation within people is plausible, and confirming the defining identities numerically. Investigate people with only one usable occasion: their deviation is zero by construction, so they provide no direct information about the within-person slope. Also examine whether a few extreme values or highly unequal numbers of visits dominate the person means. These diagnostics flag problems; they do not prove the imputation model is correct.
The main alternative is to use the raw time-varying predictor without decomposition. That may be adequate when within- and between-person associations can reasonably be treated as equal, but a single slope otherwise averages distinct comparisons. Person fixed-effects models focus on within-person associations and absorb all time-invariant person characteristics, so they do not estimate their coefficients in the same way as a model with a between-person mean. A random-intercept model with a within/between decomposition can estimate both associations, subject to its model assumptions. Choosing among these approaches depends on the estimand, study design, and available variation; decomposition alone does not settle that choice.
Common Pitfalls
- Calling the person mean a stable trait. It is an average over a defined window and may change when the window, observed visits, or imputed values change.
- Interpreting the within-person coefficient as a between-person comparison. It compares occasions relative to each person’s own mean; the between-person comparison is represented separately.
- Calling the coefficient of the person mean in a raw-\(X\) model the between-person slope. With raw \(X_{it}\) and \(\bar{X}_i\), that coefficient is \(\beta_B-\beta_W\), not \(\beta_B\).
- Keeping derived terms fixed across imputations. Recalculate means and deviations from each completed data set so their definitions remain valid and imputation uncertainty is reflected.
- Assuming centering solves confounding or missingness. The decomposition clarifies comparisons; it does not establish causality or replace defensible imputation assumptions.
Check Your Understanding
Answer the questions, then compare your reasoning with the solutions.
- A person has predictor values 3, 5, and 7 units. What are the person mean and the three deviations?
- In a model using \(X_{it}\) and \(\bar{X}_i\), the coefficient of \(\bar{X}_i\) is 0.8. Is this generally the between-person slope? Explain.
- Why should the person mean be recalculated after imputing a missing repeated value?
- What does a person with only one measurement contribute to estimation of the within-person slope?
Solutions. (1) The mean is \((3+5+7)/3=5\) units; the deviations are \(-2,0,2\) units. (2) Not generally. In the raw-\(X\) parameterization, the person-mean coefficient is the contextual contrast \(\beta_B-\beta_W\); the between-person slope is the within-person slope plus that contrast. (3) The imputed value is part of the completed-data average, and the deviations must be calculated relative to that completed mean. (4) Its sole value equals its person mean, so its deviation is zero; it supplies no within-person contrast for estimating that slope.