Lawfare Academy

Regression Analysis for Business · Chapter 7 of 8

Temporal validation, dependence and forecast-origin discipline

Return to the linked course unit →

DEVELOPED COURSE TEXT

Temporal validation, dependence and forecast-origin discipline

Match evaluation to the deployment clock

Harbor plans one month ahead with price, advertising and promotion fixed before the sales month. A rolling-origin evaluation fits on months 1 through t and predicts month t+1. The supplied development comparison uses t=16 through 23, generating eight genuinely forward predictions within the development interval. Every forecast uses only earlier sales outcomes. This differs from fitting once on all 24 development months and calling fitted residuals forecasts.
A random row split can train on later months while testing on earlier ones. That can be acceptable for some exchangeable sampling questions, but it does not mimic this chronological deployment. Trend, persistence and changing error scale make the distinction material. A lagged-sales predictor would require its value to be known at the forecast origin; a multi-step forecast cannot use actual intervening sales that have not yet occurred. The horizon and available information must be stated before computing accuracy.

Compare candidates using the same losses and rows

The baseline development rolling RMSE is about 2.953 hundreds of sales units; the interaction model is about 2.879. Both are computed on the same eight targets. The improvement is about 2.5 percent, below the prespecified 5 percent threshold, so freeze the baseline as the deployable benchmark before opening the holdout. The small difference is evidence about this finite development record, not proof of a durable superiority. RMSE squares errors before averaging and is sensitive to large misses. Mean absolute error or an asymmetric business loss can lead to a different ranking. Choose the score according to the decision and preserve the comparison design.
Training RMSE is optimistic for evaluating the fitted model's future performance because coefficients were selected to reduce those same residuals. A model with more parameters can fit better without predicting better. Rolling evaluation partially addresses that problem while revealing time-specific instability. Yet using the rolling errors repeatedly to search many specifications can overfit the development comparison too. A final locked holdout remains useful, and its limited size should constrain the strength of the performance claim.

Interpret the locked holdout without rewriting history

On months 25–32, the baseline RMSE is about 7.840 and the interaction model about 7.837. Their practical difference is negligible in this record. Both errors are much larger than their development rolling scores. The generator's innovation scale increases over time, and the finite future observations can also contain adverse shocks. This contrast is a reason to investigate forecast calibration and regime assumptions, not automatically to accuse either model of a software error.
Once the holdout is examined, it becomes evidence available for the next modeling cycle. If the analyst now revises the model to improve months 25–32, those months cannot remain an untouched test set for the revised model. Obtain a later evaluation interval or use a clearly nested design appropriate to the available data. Preserve the original forecasts and specification ledger so that later readers can distinguish a valid update from retrospective selection.

Separate covariance correction from forecasting dynamics

A HAC covariance estimate can adjust coefficient uncertainty under specified dependence conditions, but it does not change the baseline point forecasts or model the serial error path. A dynamic regression with lagged outcomes or correlated errors changes the forecasting model and may improve predictions if specified and evaluated appropriately. The estimator, uncertainty calculation and evaluation design are three separate choices. Calling them all robust analysis hides which operation was performed.
For actual deployment, monitor predictor distributions, missingness, signed forecast errors and decision consequences. A model can remain statistically similar while becoming economically inappropriate if inventory or staffing costs change. Conversely, a temporary large error does not prove a structural break. A review trigger should specify what evidence leads to investigation or recalibration. The useful standard is reproducible chronological performance with a transparent update process, rather than a single favorable error metric or a promise that the future will match the development period.

Inspect every locked forecast and the naive benchmark

The last-month benchmark predicts the next month from the immediately preceding observed sales value; it uses information available at each one-step origin and does not refit on future outcomes. Its holdout RMSE is 12.042768 hundreds. Compare it with the same eight baseline and interaction predictions below. A structural coefficient closer to the generator is not the same objective as outperforming this operational benchmark.

MonthActual salesBaseline forecastInteraction forecastLast-month benchmark
2584.02400089.12796489.555733107.480000
2689.66300090.04849190.45201784.024000
2797.39300096.94304997.17359289.663000
28106.272000105.235332101.15654297.393000
2998.106000102.629398102.729081106.272000
3082.75700092.11298492.62355498.106000
3181.77900097.20394797.60157482.757000
3293.459000104.335942101.51246281.779000

Worked records

Record 1

Baseline and interaction models use identical forward development targets (months 17–24) and identical locked holdout targets (25–32). All predictors are stipulated known at each forecast origin.

Develop the reasoning

Baseline rolling RMSE=2.953118; interaction=2.879170. Holdout RMSE baseline=7.839871; interaction=7.837191. The interaction’s tiny holdout advantage does not justify a claim of reliable economic improvement. The prespecified 5 percent improvement rule already selected the baseline before the holdout was opened. Retain that choice and report the alternative as a comparison, not a post-holdout selection.

Progressive practice — optional

1. Foundation

At an origin immediately after month 18, which sales outcomes may train a one-step forecast?

Compare the worked reasoning

Months 1–18 only; month 19 is the target.

Change the record

A two-step forecast targets month 20.

Compare the changed-record reasoning

Actual month-19 sales are unavailable at the origin. Any lagged-outcome method must forecast or integrate over them rather than use their realized value.

2. Application

For forecast errors 2,-2,4,-4, calculate RMSE.

Compare the worked reasoning

Mean squared error=(4+4+16+16)/4=10; RMSE=sqrt(10)≈3.1623.

Change the record

A fifth error of 10 is added.

Compare the changed-record reasoning

MSE=140/5=28 and RMSE≈5.2915. The large miss strongly affects squared-error scoring.

3. Transfer

Can the analyst tune a model on the holdout and still report that holdout as untouched validation?

Compare the worked reasoning

No. It has entered model selection.

Change the record

A later eight-month interval becomes available after the revision is frozen.

Compare the changed-record reasoning

Use that later interval for the revised model’s out-of-time evaluation, preserving the earlier forecast record and noting any changed operating regime.

Sources and scope