Why Choose a Common Covariate Profile?
Suppose a fitted regression model relates an outcome to both a group factor and a quantitative covariate. The model can predict an outcome for each group at a particular covariate value. If we want to compare groups fairly on the model’s terms, we can set the covariate to the same explicit value for every group. The resulting fitted means describe a comparison at that shared profile.
For example, a model might predict a follow-up score for each program group at a baseline score of 50. Those fitted means answer a conditional question: what does the model predict for each group when baseline score is 50? They are not the raw averages within the groups, and they do not automatically describe an effect that would occur if people were assigned to a group.
Calculating the Fitted Means
Begin with the fitted regression equation and the factor coding used in that equation. Substitute the chosen common covariate values and the indicator values for each group. The result for a group is its fitted mean at that profile.
For a two-group model with a quantitative covariate \(x\), a model without a group-by-covariate interaction can be written as
where \(G=0\) for group A and \(G=1\) for group B. At a common value \(x_0\), the fitted means are \(b_0+b_2x_0\) for A and \(b_0+b_1+b_2x_0\) for B. The shared covariate contribution is included in both predictions; only the group indicator changes.
A fitted mean is a model-based estimate of the conditional mean response, not a prediction of the exact outcome for one individual. The regression model must be a reasonable representation of the conditional mean in the setting. In particular, the response mean should have the specified form in the predictors, and the model’s error should have conditional mean zero. Independence of errors is also commonly assumed for fitting with ordinary least squares. Constant error variance is needed for some conventional uncertainty calculations, but it is not required merely to substitute values into an already fitted equation.
Worked Example: Two Groups at a Shared Baseline Score
Consider a hypothetical analysis of 60 distinct participants, each in program A or program B. The response is a follow-up score, and \(x\) is the baseline score. Suppose the fitted equation is
where \(G=0\) for program A and \(G=1\) for program B. Calculate both fitted means at the common baseline score \(x_0=50\).
Check the model conditions for this illustration. Assume each participant contributes one independent observation, and that the fitted linear mean form is suitable over the score range that includes 50. The conditional mean-zero error assumption is part of the model; it cannot be established from this equation alone. These conditions make the fitted values interpretable as model-based conditional means, subject to the model being adequate.
For program A, substitute \(G=0\) and \(x=50\):
For program B, substitute \(G=1\) and the same baseline score:
At baseline score 50, the model’s fitted mean follow-up scores are 48 for program A and 52 for program B. The fitted difference, B minus A, is \(52-48=4\) score points at that baseline score. This is a profile-specific model comparison. Without a study design and assumptions supporting a causal interpretation, it should not be described as the effect of assigning a participant to program B rather than A.
More Than One Group or Covariate
The same substitution principle applies when a factor has more than two levels and when the model contains several quantitative covariates. Suppose A is the reference group, and the model includes indicators for groups B and C. A common profile might set baseline score to 40 and age to 30 years. Each group’s fitted mean is found by entering those same values for both quantitative covariates and setting the group indicators appropriately.
The word adjusted here means that the model-based group predictions are evaluated at the specified common covariate values. It does not mean that the group means have been averaged over all observed covariate values. The answer depends on which profile is chosen, so report the profile alongside the fitted means.
Worked Example: Three Groups at a Common Two-Covariate Profile
In a hypothetical sample of 120 independent patients, a clinic models a follow-up score using clinic group, baseline score \(x\), and age \(z\) in years. Suppose the fitted model is
where \(I_B=1\) for group B and 0 otherwise, and \(I_C=1\) for group C and 0 otherwise. Group A has \(I_B=I_C=0\). Find the fitted means at the common profile \(x=40\) and \(z=30\).
Check the model conditions for this illustration. Assume each patient is represented once, the observations are independent, and the linear conditional-mean form is adequate over the covariate range containing this profile. The group coding assigns exactly one of A, B, or C to each patient. The zero conditional-mean error condition is assumed as part of the regression model. If the chosen profile were outside the relevant data range, these calculations could require extrapolation; here, assume the profile is within the range represented for the groups being compared.
The shared contribution from the intercept and covariates is
For group A, both indicators are zero, so \(\widehat{Y}_A=68\). For group B, \(I_B=1\) and \(I_C=0\):
For group C, \(I_B=0\) and \(I_C=1\):
At baseline score 40 and age 30 years, the fitted follow-up means are 68, 71, and 66 score points for groups A, B, and C, respectively. For example, the model’s fitted comparison of B with C at this profile is \(71-66=5\) score points. These are conditional model predictions, not necessarily the observed averages of the three clinics.
When the Comparison Depends on the Profile
A group-by-covariate interaction allows the relationship between a quantitative covariate and the mean response to differ across groups. In that case, the group difference is not necessarily constant across covariate values. The adjusted fitted means must still be calculated at a shared profile, but changing the profile can change their difference.
For a two-group model with an interaction,
the fitted mean for A at \(x_0\) is \(b_0+b_2x_0\), while the fitted mean for B is \(b_0+b_1+b_2x_0+b_3x_0\). Subtracting the first from the second gives \(b_1+b_3x_0\). Thus the interaction contribution, \(b_3x_0\), makes the fitted group difference depend on the common covariate value.
Worked Example: An Interaction Changes the Group Difference
Suppose a hypothetical study models a score \(Y\) for two groups using baseline score \(x\). The fitted equation is
where \(G=0\) denotes group A and \(G=1\) denotes group B. Assume independent observations, a suitable linear mean relationship within each group over the baseline-score range considered, and a conditional-mean-zero error model. The interaction term allows the slopes to differ: the fitted slope is 0.40 for A and \(0.40-0.05=0.35\) for B.
At the shared profile \(x=20\), group A has fitted mean
For group B at exactly the same baseline score,
The fitted B-minus-A difference at baseline score 20 is \(19-18=1\) score point. At a different shared profile, \(x=40\), the fitted means would be \(10+0.40(40)=26\) for A and \(10+2+0.40(40)-0.05(40)=26\) for B. The difference is then 0. The comparison must therefore be reported with its profile: “a fitted difference of 1 point at baseline score 20,” not simply “the groups differ by 1 point.”
Why the Profile Must Be Reported
A common-profile comparison answers a specific conditional question. It can be useful when the covariates matter for the outcome and a reader wants to compare model predictions while holding those covariates fixed. But one selected profile is not automatically representative of every individual or every covariate value. With interactions, it may give a substantially different group comparison from another profile.
The profile should be explicit and sensible for the application. If a model includes baseline score and age, state both values and their units. Also consider whether the profile is within the range of values represented in each group. A fitted mean at an unsupported profile may rely heavily on extrapolation and can be misleading even if the arithmetic is correct.
These fitted means are conditional on the specified regression model. In an observational comparison, setting covariates to common values does not by itself remove confounding or establish that group membership caused an outcome difference. The safe interpretation is that the fitted model predicts different conditional means at the stated profile.
Common Mistakes
- Using different covariate values for different groups. That compares predictions at different profiles. For a common-profile comparison, hold every listed covariate at the same value across groups.
- Calling a fitted mean a raw group average. It is calculated from the fitted model at specified covariate values; the observed group average is a different summary.
- Ignoring interactions. With a group-by-covariate interaction, a group coefficient alone is not the group difference at every covariate value. Substitute the chosen profile into the full model.
- Claiming a causal effect from adjustment alone. Common-profile predictions are model-based conditional comparisons. Their calculation alone does not establish causation.
Check Your Understanding
Try these questions using the definitions and calculations in this tutorial.
- For \(\widehat{Y}=8+3G+0.5x\), with \(G=0\) for A and \(G=1\) for B, calculate both fitted means at the common profile \(x=12\).
- In a model with two quantitative covariates, what must be stated to define a common covariate profile?
- For \(\widehat{Y}=5+2G+0.4x-0.1Gx\), calculate the fitted group difference B minus A at \(x=10\).
- Why should a profile-specific fitted mean not automatically be described as a causal effect?
- What concern arises if the chosen common profile is far outside the observed covariate range for one of the groups?