Lawfare Group → Knowledge Institute → Lawfare Academy

← Course syllabus · Related lesson

Make the reference point and the interaction explicit

Current complete on-site edition 6

Required teaching and complete optional models are supplied on LawfareGroup.com. Publisher and primary links are optional provenance or further reading. Florida is the contemporary state-law default; federal rules and explicitly comparative accounting frameworks are distinguished. Independent subject review and observed human learner testing remain pending.

Cumulative regression and forecasting dossier, transfer models and 30-point rubric

Preserved original teaching integrated with complete current on-site preparation. Independent human subject review and observed learner testing remain pending.

Learning objectives

One coefficient cannot describe two different slopes

Two branches relate a budget index x to a response y. For branch A, observations at x=1,2,3 are y=12,14,16. For branch B at the same x values, they are y=19,18,17. A’s fitted line is y=10+2x; B’s is y=20−x. A common-slope model imposes parallel lines and cannot represent both patterns exactly.

Code D=0 for A and D=1 for B. The interaction model y=a+bx+cD+d(xD) gives A’s line a+bx and B’s line (a+c)+(b+d)x. Matching the two observed lines yields a=10, b=2, c=10 and d=−3. The interaction coefficient is a difference of slopes: B’s slope minus A’s slope is −1−2=−3. It is not the slope of B by itself.

The group coefficient c compares branches when x=0 because the interaction term then vanishes. Here x=0 is outside the observed 1–3 range. Reporting c=10 as the branch difference at a typical observed budget would therefore misdescribe the parameter. At x=2, B−A is c+dx=10−6=4. At x=3 the difference is 1. A group comparison in an interaction model must state the predictor value at which it is made.

Recenter to change the reference, not the fitted evidence

Let z=x−2, so x=z+2. Substitute into the model: y=(a+2b)+bz+(c+2d)D+d(zD). The centered coefficients are intercept 14, slope 2, group coefficient 4 and interaction −3. The group coefficient now describes B−A at x=2, a value within the shared observed range. Every fitted value is unchanged. Centering changes the coordinates and interpretation of lower-order terms; it does not create new observations or remove an interaction.

The branch difference is zero where 10−3x=0, namely x=10/3≈3.333333. That crossing lies beyond the observed maximum of 3. The equation defines an extrapolated crossing under the assumed linear continuation; it does not show that a real branch crossover has been observed. At x=4, the lines predict A=18 and B=16, reversing the difference. A recommendation based on that extrapolation needs evidence about behavior outside the current range.

Changing the reference branch also changes the coefficient labels. If B is the reference, the baseline slope is −1 and the other branch’s slope difference is +3. Fitted predictions remain the same after a consistent recoding. Compare substantive predictions and contrasts rather than treating a sign change caused by reference coding as new empirical evidence.

Separate model structure from precision and causal claims

For the balanced six-point fixture, a common-slope model has slope .5, A intercept 13 and a four-point B intercept shift. Its fitted values are A=[13.5,14,14.5] and B=[17.5,18,18.5], with residual sum of squares 9. The interaction model has residual sum zero because these synthetic points lie exactly on the two chosen lines. The improvement shows the restriction imposed by common slopes. It does not establish that a real process has zero noise or that a fitted interaction will generalize.

Six observations and four fitted coefficients leave two residual degrees of freedom. The artificial zero residual variance should not be converted into a real-world claim of perfect precision. A real study needs a justified error model, enough independent information across the operating range and assessment of model form. Repeated readings of the same branch-day are not necessarily independent replicates. Model comparisons and intervals should respect the actual units and variance structure.

With many predictors and groups, searching for every possible interaction can create substantial selection and multiplicity. State the motivated interaction and planned comparisons; keep lower-order terms needed to interpret the hierarchical model. Do not select a convenient reference point after seeing where a contrast happens to be largest and then report its unadjusted interval as though that point were prespecified.

An interaction in observed outcomes is also not automatically a causal effect modification claim. Budgets may be allocated in response to expected performance, or branch processes may differ in other ways. Define the intervention and its assignment mechanism before recommending a budget change. If B were observed only at x=5,6,7 while A remained at 1,2,3, their comparison at x=2 would extrapolate B’s relation beyond its support. Centering at two would make the coefficient easier to name while leaving that lack of overlap unresolved.

Worked example: Reconstruct the lines from coefficients

Using (a,b,c,d)=(10,2,10,−3), A at x=2 gives 10+4=14 and B gives 10+4+10−6=18. With z=0 at the same x, the centered equation gives 14 for A and 14+4=18 for B. These equalities are implementation checks. A failure indicates an inconsistent interaction column or recoding.

Worked example: An exact fit is a teaching construction

The common-slope residuals are A=[−1.5,0,1.5] and B=[1.5,0,−1.5], whose squared sum is 9. The interaction model fits all six values exactly. Perturbing even one response changes the residual evidence and estimates. Retain the synthetic nature of the fixture when interpreting the result; do not advertise the zero residual sum as a predictive validation score.

Progressive optional practice

Attempt each problem before opening its model. Then revise the reasoning under the changed conditions.

Guided

Translate the interaction equation into the two branch lines and compute B−A at x=2.

Compare the model reasoning

A is 10+2x, B is 20−x, and the contrast at two is 4. The interaction −3 is the slope difference, not B’s slope.

Changed conditions

B becomes the reference branch.

Compare the revised analysis

The baseline line is 20−x and the A-minus-B slope difference is +3. Consistent recoding preserves all predictions.

Independent

Recenter at x=2 and explain each changed coefficient.

Compare the model reasoning

With z=x−2, the coefficients are 14,2,4,−3. The intercept and group shift now refer to x=2; slopes and fitted values are unchanged.

Changed conditions

The analyst claims that centering proves a crossover was observed.

Compare the revised analysis

Centering adds no evidence. The crossing at 10/3 lies outside the observed range; it remains an extrapolated consequence of the chosen linear model.

Transfer

B is observed only at x=5,6,7 and A only at 1,2,3. Evaluate a comparison at x=2.

Compare the model reasoning

The B prediction at two extrapolates beyond its observed range. State the overlap limitation, obtain appropriate evidence or limit the target; centering cannot repair missing support.

Changed conditions

The budget is assigned in response to anticipated sales.

Compare the revised analysis

The observed regression need not identify the causal effect of changing budget. Investigate assignment and confounding separately from fitting the interaction.

Source readings and scope

Penn State STAT 501: categorical predictors — University reading on categorical predictors and interactions. Branch data, recentering algebra and exercises are original.

NIH AFNI: centering variables — Primary software-methods discussion of reference points and interpretation; no medical inference or universal variable-selection rule is adopted here.

Reproduce the worked examples in Python 3. Standard library only; synthetic data; no production records or network access.