Why Compare Matched Profiles?
A multiple-regression equation can be used to predict an outcome for a specified combination of predictor values. Comparing two such predictions is especially informative when the profiles match on all but one predictor. The difference then describes how the model’s predictions change with that predictor while the others are held fixed.
For instance, a housing analyst might compare predicted sale prices for two homes with the same lot area and age but different floor areas. This is a comparison made by the fitted model, not a claim that changing a home’s floor area would cause its price to change by that amount. The calculation is direct, but it depends on stating the profiles clearly, using the fitted equation correctly, and interpreting the result in the outcome’s units.
The Model and the Matched-Profile Calculation
Suppose \(Y\) is a quantitative outcome and \(X_1,\ldots,X_k\) are predictors. In an additive linear regression model, the conditional mean of the outcome is represented as a linear expression in the predictors. A fitted equation uses estimated coefficients, denoted here by \(b_0,b_1,\ldots,b_k\), to produce a predicted value.
Here \(\beta_0,\ldots,\beta_k\) are the model’s population coefficients. Once the model has been fitted, the prediction for a profile is calculated with the estimated coefficients:
To compare two profiles, substitute the values for each profile into this equation. If the profiles differ only in \(X_j\), subtracting their predictions makes the common terms cancel. For an additive model, this gives the coefficient \(b_j\) multiplied by the difference between the two \(X_j\) values.
This is a short algebraic justification for an important check on the calculation: the difference obtained by computing both predictions should agree with the coefficient-times-difference calculation. The shortcut does not replace the need to state which profile is first, and it applies directly when the fitted equation is additive, without interaction terms.
A Reliable Calculation Process
Before substituting numbers, write down the two profiles in words or in a small table. This makes it easier to catch accidental changes in a predictor that was supposed to be held fixed. Then compute each fitted prediction, show the subtraction in the stated order, and report the result in the units of \(Y\).
Use the estimated coefficients and keep track of the outcome units, predictor units, and any category coding.
List every predictor value for profile A and profile B. Confirm that only the intended predictor differs.
Substitute each profile separately, showing the products and their sum.
Calculate \(\hat{y}_A-\hat{y}_B\), state which predicted profile is higher if the result is positive, and give the difference in outcome units.
Worked Example: Comparing Two Homes With Different Floor Areas
Suppose a hypothetical housing analyst fits this equation to predict sale price, measured in thousands of dollars, from floor area in hundreds of square feet and lot area in hundreds of square feet:
Compare a home with 16 hundreds of square feet of floor area and 5 hundreds of square feet of lot area with a home having 14 hundreds of square feet of floor area and the same lot area. The profiles differ only in floor area.
First home: Substitute floor area \(=16\) and lot area \(=5\):
The fitted prediction is 438 thousand dollars. Second home:
Subtract in the stated order:
The model predicts a sale price 42 thousand dollars higher for the first profile than for the second, with lot area held at 5 hundreds of square feet. As a check, the floor-area difference is \(16-14=2\) hundreds of square feet, so the contrast is \(21(2)=42\) thousand dollars. These are model predictions, not guaranteed sale prices or a causal effect of adding floor area.
Matched Profiles With Coded Predictors
A predictor may represent a category rather than a measurement. In a model, a two-category predictor is often represented by an indicator that equals 0 for a reference category and 1 for the other category. The coefficient for that indicator contributes to the prediction when its value is 1. When comparing profiles, use the coding stated in the fitted equation; do not substitute category labels as if they were numerical measurements.
Worked Example: Comparing Two Training Formats at the Same Attendance
In a hypothetical training program, a fitted equation predicts a final assessment score in points from attendance, measured in sessions, and a format indicator \(F\). The coding is \(F=0\) for in-person training and \(F=1\) for online training:
Compare profiles with attendance of 12 sessions: profile A is online and profile B is in-person. These profiles match on attendance.
Online profile:
In-person profile:
Thus \(\widehat{\text{Score}}_A-\widehat{\text{Score}}_B=71-68=3\) points. The fitted model predicts a score 3 points higher for the online profile at the same attendance of 12 sessions. This is a comparison of model predictions under the stated coding; it does not by itself show that training format causes a score difference.
Several Predictors Can Be Held Fixed
The same process works when an equation has more than two predictors. Every value must be substituted for each profile, including values that are identical. Keeping the common terms visible helps show that the profiles really are matched and helps identify arithmetic errors.
Worked Example: Comparing Two Machines at the Same Settings
Suppose a hypothetical factory model predicts daily output in units from operating temperature in degrees and machine age in years:
Compare a 4-year-old machine and a 7-year-old machine, both operating at 30 degrees. Profile A is the 4-year-old machine; profile B is the 7-year-old machine.
Profile A:
Profile B:
The predicted contrast is
For these matched profiles, the model predicts 6.6 more units of daily output for the 4-year-old machine. The age difference in the stated order is \(4-7=-3\) years, and the age coefficient is \(-2.2\) units per year; their product is \((-2.2)(-3)=6.6\) units. Temperature contributes equally to both predictions and therefore does not affect their difference.
Common Mistakes and Why the Comparison Matters
Matched-profile predictions make the meaning of an adjusted comparison concrete: each profile is evaluated at the same specified values of the other predictors. This is useful when the goal is to describe what the fitted equation predicts for particular combinations, rather than comparing people or objects whose predictor values differ in several ways.
- Changing more than one predictor. If profiles differ in both floor area and lot area, their prediction difference combines both changes. To isolate a one-predictor comparison, keep the other listed values identical.
- Reporting only the coefficient. A coefficient is a predicted outcome change per one-unit increase in its predictor, with the other predictors fixed. For a change of several units, multiply the coefficient by the predictor difference or compute and subtract both predictions.
- Reversing the subtraction. The contrast A minus B is the negative of B minus A. State the order so the sign and wording agree.
- Dropping a minus sign. In the machine example, increasing age by 3 years changes the prediction by \((-2.2)(3)=-6.6\) units. Reversing the comparison gives \(+6.6\), not \(-6.6\).
- Treating the prediction as an observed value or a causal effect. The fitted equation gives a model-based prediction for a profile. The observed outcome can differ, and a matched-profile arithmetic comparison alone does not establish causation.
- Mixing units or coding. A coefficient must be multiplied by a predictor difference expressed in the units used to fit the equation. For a category indicator, use the specified 0/1 coding rather than an informal label.
A final arithmetic check is to calculate the contrast both ways when the equation is additive: subtract the two fully computed predictions, and multiply the changed predictor’s coefficient by its profile difference. Agreement confirms the subtraction and the direction of the comparison.
Check Your Understanding
For each question, identify the matched profiles and interpret the predicted contrast in context.
- A fitted equation is \(\widehat{Y}=10+4X-2Z\). Compare profile A with \(X=6,Z=3\) and profile B with \(X=2,Z=3\). Calculate both predictions and A minus B.
- In the same equation, suppose profile A has \(X=2,Z=5\) and profile B has \(X=2,Z=3\). Which predictor differs, and what is the predicted contrast A minus B?
- A model uses an indicator \(G\), coded 0 for Group 1 and 1 for Group 2. What value should be substituted to predict for Group 2?
- Why does subtracting predictions for two profiles that match on every predictor except \(X_j\) cancel the intercept and the other predictor terms in an additive model?
- Explain why a predicted contrast from a fitted regression equation does not, by itself, establish that changing the predictor would cause the outcome to change.