Lawfare Academy

Regression Analysis for Business · Chapter 4 of 8

Interactions, centering and nonlinear interpretations

Return to the linked course unit →

DEVELOPED COURSE TEXT

Interactions, centering and nonlinear interpretations

Interpret an interaction as a conditional effect

The prespecified alternative adds price times promotion to the baseline model. Its conditional mean is beta_0+beta_p price+beta_a advertising+beta_d promotion+beta_t month+beta_pd price×promotion. When promotion is zero, the price slope is beta_p. When promotion is one, the slope is beta_p+beta_pd. The promotion difference at a given price is beta_d+beta_pd price. Thus neither beta_d nor beta_pd alone is a universal promotion effect.
The actual development fit has beta_p about -1.380, beta_d about 29.999 and beta_pd about -1.076. At price 22, the fitted promotion contrast is about 6.337 hundreds, not 29.999. The latter is the promotion contrast at zero price, a poor reference for this record. This is why business interpretation should use meaningful predictor values and explicit contrasts rather than read every printed coefficient as a standalone effect.

Center a variable without changing the model space

Define centered price p_c=price-22. Rewriting the interaction gives beta_pd p_c×promotion and a promotion coefficient beta_d+22beta_pd. The main price slope and interaction coefficient are unchanged; the intercept also changes by 22beta_p. Fitted values and residual sum of squares remain identical because this is an invertible reparameterization of the same columns. Centering can make coefficients easier to interpret and reduce some numerical correlation, but it does not create identifying variation.
The uncertainty of the centered promotion coefficient must be transformed using the full covariance matrix. A standard error copied from the uncentered promotion coefficient would be wrong. Likewise, evaluating the promotion contrast at price 30 rather than 22 changes the contrast vector and its uncertainty. If few promoted months occur near 30, the estimate may rely on extrapolation. Inspect overlap of price distributions across promotion states before interpreting the interaction as a meaningful comparison.

Choose a transformation according to the target relationship

A log-outcome model assumes additive effects on log sales, which correspond to multiplicative conditional relationships on the original scale. A coefficient b on a binary indicator implies a ratio exp(b) in the modeled log-location, with an exact percentage contrast 100[exp(b)-1], not exactly 100b except for small b. A log-log coefficient is a local elasticity under the specified model. These interpretations differ from the additive hundreds-per-dollar baseline.
Exponentiating a fitted log outcome does not generally equal the conditional mean of sales because the exponential function is nonlinear. If log errors are Gaussian with constant variance sigma squared, the mean includes exp(sigma squared/2). A residual-based smearing factor offers a different retransformation approach under its assumptions. Neither correction is automatically valid when error distributions vary with predictors. A forecast comparison must score all models on the same original sales scale and evaluation rows, rather than compare unlike R squared values.

Keep specification search and scientific explanation separate

The interaction model slightly improves development fit, but its price-interaction conventional SE is about 1.317, larger than the absolute interaction estimate. This does not prove the true interaction is zero, nor does a large p-value validate the additive model. It shows limited precision under that benchmark and finite record. Model choice also depends on development forecast performance, interpretability, plausible mechanisms and the cost of instability.
The data were generated without a true price-promotion interaction. The fitted nonzero interaction reflects finite-sample variation and the other specification features. Knowing the generator makes this a useful teaching contrast, but a real analyst does not have that privilege. Record why the candidate was proposed before seeing the holdout, calculate relevant contrasts and retain an honest evaluation. The ability to add a column is not evidence that the new effect exists or that the resulting model improves a decision.

Worked records

Record 1

Fit [1,price,advertising,promotion,month,price×promotion] on the same 24 development months.

TermEstimateConventional SEHC3 SEHAC(2) SE
Intercept81.2498758.5185018.8625506.235542
Price-1.3804620.3539260.3782210.304003
Advertising2.3705300.4168650.3534620.184034
Promotion29.99850028.36220427.1084839.160881
Month0.8716820.0942790.1067610.072711
Price × promotion-1.0755171.3169301.2456550.416301

Develop the reasoning

At price 22, promotion contrast is 6.337116. Nonpromotion price slope is -1.380462; promotion slope is -2.455979. Replacing price with price-22 and retaining the corresponding interaction yields identical predictions when coefficients are transformed consistently. The actual promotion contrast at price 22 has conventional benchmark SE 1.439585. This comes from the full covariance matrix, including the promotion/interaction covariance, and is not validated causal uncertainty.

Progressive practice — optional

1. Foundation

In y=b0+b1p+b2D+b3pD, state the price slopes.

Compare the worked reasoning

At D=0 the slope is b1; at D=1 it is b1+b3.

Change the record

D represents a different category coded 2 instead of 1.

Compare the changed-record reasoning

If using this numeric coding without recoding, the slope at D=2 is b1+2b3. For a binary category effect, define an explicit zero/one indicator to avoid accidental scaling.

2. Application

For b2=30,b3=-1.1, find the promotion contrast at price 22.

Compare the worked reasoning

30-1.1×22=5.8.

Change the record

Center price at 20.

Compare the changed-record reasoning

The centered promotion coefficient is 30-22=8; at centered price 2 the contrast remains 8-2.2=5.8. Reparameterization does not change predictions.

3. Transfer

A log-sales indicator coefficient is .2. What is the exact multiplicative contrast?

Compare the worked reasoning

exp(.2)≈1.2214, a 22.14 percent contrast in the specified log model, not exactly 20 percent.

Change the record

The task is to forecast mean sales and log residual variance is .16 under a stated Gaussian homoscedastic model.

Compare the changed-record reasoning

Multiply exp(predicted log sales) by exp(.08)≈1.0833 for the conditional-mean correction. If the Gaussian/constant-variance assumptions fail, rederive or validate the retransformation.

Sources and scope