Comparing two forecasters

The correction that leaves the region

The bias correction adds (1 + 3φ̂)/n whatever φ̂ is, so it pushes the estimate above one whenever φ̂ exceeds (n − 1)/(n + 3) — on 31.1% of series at φ = 0.95 and twenty-five observations. Five obvious things to do about it differ by a factor of 2.3 in squared forecast error, and none of them is documented as a choice.

Worth reading first: Correcting the persistence.

The correction three essays before this one have measured is one line:

φ~=φ^+1+3φ^n\tilde\varphi = \hat\varphi + \frac{1 + 3\hat\varphi}{n}

Everything about it is additive. It adds a fixed amount, decided by the estimate and the sample size, and it does not know that the quantity it is adding to has an upper bound.

A persistence at or above one is not a persistence. The series is a random walk or explosive, it has no long-run mean to revert to, the variance formula σ2ψ2\sigma^{2}\sum\psi^{2} diverges, and the forecast grows without limit. So the correction produces, on some samples, an object the model has no interpretation for — and something has to be done.

Five treatments of an estimate above one, φ = 0.95, n = 25The correction exceeds one on 31.1% of series at this setting. left where it lands: squared forecast error 12.828, average decay factor 0.7974 against a true 0.7351; capped at 0.995: squared forecast error 5.680, average decay factor 0.5950 against a true 0.7351; capped at 1 − 1/n: squared forecast error 5.535, average decay factor 0.5256 against a true 0.7351; correction scaled to fit: squared forecast error 5.535, average decay factor 0.5256 against a true 0.7351; correction refused where it leaves: squared forecast error 5.868, average decay factor 0.4423 against a true 0.7351.left where it lands12.828decay 0.7974capped at 0.9955.680decay 0.5950capped at 1 − 1/n5.535decay 0.5256correction scaled to fit5.535decay 0.5256correction refused where it leaves5.868decay 0.44234,000 series, truth φ^6 = 0.735131% of series need a decision
Fig. 1 Five things to do about it, at φ = 0.95 on twenty-five observations, where the correction leaves the region on 31.1% of series. Left where it lands the squared forecast error is 12.828; the four treatments give 5.680, 5.535, 5.535 and 5.868.

The threshold is exact

How often this happens does not need a simulation, which is unusual for this field.

The corrected estimate exceeds one exactly when

φ^+1+3φ^n>1φ^>n1n+3\hat\varphi + \frac{1 + 3\hat\varphi}{n} > 1 \quad\Longleftrightarrow\quad \hat\varphi > \frac{n-1}{n+3}

Two lines of algebra, no distributional assumption, and no reference to the truth. At twenty-five observations the threshold is 0.8571; at fifty, 0.9245; at a hundred, 0.9612; at two hundred, 0.9803.

So the question how often does the correction leave the region becomes the question how often does the raw estimate exceed a known number, which is a tail probability of the least-squares estimator and is the only thing that has to be counted.

How often the correction leaves the stationary region. The closed-form threshold is φ̂ > (n − 1)/(n + 3), which is 0.8571 at n = 25, 0.9245 at n = 50, 0.9612 at n = 100, 0.9803 at n = 200. Counted over 3,000 series at each cell, the rate reaches 37.9% at φ = 0.99 on 25 observations and falls to 29.5% at 200.
Fig. 2 Counted over three thousand series at each cell. At twenty-five observations the rate is 8.4% at a true persistence of 0.8, 31.1% at 0.95 and 37.9% at 0.99. At two hundred observations it is still 29.5% at 0.99, because the threshold rises towards one as fast as the estimator’s precision does.

The last reading is the one worth pausing on. More data does not make the problem go away at high persistence: the threshold (n1)/(n+3)(n-1)/(n+3) approaches one at rate 4/n4/n and the estimator’s standard error falls at rate 1/n1/\sqrt n, so the gap between the threshold and the truth shrinks faster than the estimator concentrates. At φ=0.99\varphi = 0.99 the rate is 37.9% on twenty-five observations and 29.5% on two hundred.

The correction is least usable exactly where the bias it repairs is largest, which is the same shape the collapse of a variance estimate to zero has in the hierarchical setting: the estimator returns the boundary of its own range most often where it is most needed.

Five treatments, none of them documented

What gets done about it varies by implementation and none of the five is called a choice of estimator, which is what each of them is.

Left where it lands. The estimate is used as it comes. The forecast then applies a decay factor above one, which grows with the horizon rather than decaying, and the largest one produced at this setting is 4.914 at six steps. Squared forecast error is 12.828.

Capped at a constant, usually something like 0.995. Squared error 5.680, and the average decay factor is 0.5950 against a truth of 0.7351.

Capped at 11/n1 - 1/n. A cap that moves with the sample size rather than a fixed number. Squared error 5.535, the best of the five here, and the average decay factor 0.5256.

The correction scaled to fit. Instead of truncating the result, shrink the correction until the result lands at 11/n1-1/n. On these samples that gives exactly the same answer as the previous treatment, because the two differ only in how the landing point is reached and both land there.

Refused where it leaves. The correction is applied where it stays inside and skipped where it would not, so the estimate is the raw φ^\hat\varphi on those samples. Squared error 5.868.

The spread between the four sensible treatments is 5.535 to 5.868 — six per cent — and between the worst and best of all five it is 2.3 times. An analyst comparing two software implementations of “the bias-corrected AR(1) forecast” could see a six per cent difference in forecast accuracy and have no documented reason for it.

Five treatments of an estimate above one, φ = 0.8, n = 25. The correction exceeds one on 8.4% of series at this setting. left where it lands: squared forecast error 4.361, average decay factor 0.3856 against a true 0.2621; capped at 0.995: squared forecast error 3.496, average decay factor 0.3524 against a true 0.2621; capped at 1 − 1/n: squared forecast error 3.339, average decay factor 0.3308 against a true 0.2621; correction scaled to fit: squared forecast error 3.339, average decay factor 0.3308 against a true 0.2621; correction refused where it leaves: squared forecast error 3.223, average decay factor 0.2845 against a true 0.2621.
Fig. 3 The mildest setting on the slider, where the correction leaves the region on 8.4% of series. Even here leaving the estimate where it lands costs 4.361 against the best treatment’s 3.223 — a third more, from a decision taken on one series in twelve.

Why leaving it alone is so much worse

The factor of 2.3 deserves its own paragraph, because it is not a small inefficiency and it is not about bias at all.

An uncapped corrected estimate above one produces φ~h\tilde\varphi^{h}, and at six steps a persistence of 1.3 gives a decay factor of 4.8. The forecast is then the last observation’s deviation from the mean multiplied by nearly five, in the same direction. On a series whose last value happened to be far from the mean, the forecast is very far indeed, and squared error is quadratic in that.

So the damage is concentrated on a small share of samples and is enormous on each of them. The average decay factor under this treatment is 0.7974, which is the closest of the five to the truth of 0.7351 — the treatment with the smallest bias in the decay factor is the worst forecast by a factor of two, because the mean of a quantity with a heavy right tail is not what squared error is about.

That is the same reading correcting the forecast instead arrived at from the other direction, and here it is sharper: a decay factor averaging 0.797 against a truth of 0.735 looks like the best of the five in a table of averages and is the one that occasionally forecasts a value five times further from the mean than the data was.

The rate is not about the truth, it is about the estimate

One property of the threshold makes this measurable in practice rather than only in simulation, and it is easy to walk past.

(n1)/(n+3)(n-1)/(n+3) contains no unknown. It is a function of the sample size, so an analyst with one series can check whether their own correction has left the region — they have φ^\hat\varphi and they have nn, and the comparison is one line. There is no need to know φ\varphi and no need to simulate anything.

What the simulation adds is the rate, which is a statement about how often it would happen to studies like this one, and that does need the truth. Both numbers are useful and they answer different questions: the threshold answers did it happen to me, and the rate answers how much of a published improvement is the cap.

This is the same division the exact-coverage arguments in the interval fields make. A procedure’s behaviour on the sample in hand is checkable; its behaviour across samples is a property of the procedure and has to be computed against a truth. Where a check of the first kind exists it is nearly always the one to run, because it needs nothing nobody has.

Which cap, and it changes with the setting

The four sensible treatments are close and their ordering is not stable, which is worth knowing before any of them is recommended.

At φ=0.95\varphi = 0.95 the moving cap wins at 5.535 against the fixed cap’s 5.680. At φ=0.99\varphi = 0.99 the ordering reverses: the fixed cap gives 6.258 and the moving cap 6.424. At φ=0.8\varphi = 0.8 refusing the correction on the affected samples wins, at 3.223 against 3.339, and the correction leaves the region on 8.4% of series there.

The mechanism is the one the whole field runs on. A cap is a shrinkage towards the value capped at, and which cap is best depends on how far the truth is from it. At φ=0.99\varphi = 0.99 the moving cap of 11/25=0.961 - 1/25 = 0.96 is further below the truth than 0.995 is, so it over-shrinks; at φ=0.95\varphi = 0.95 it is closer.

So there is no best treatment, only a best treatment given the truth. What can be said is the ordering that does hold everywhere: leaving the estimate where it lands is worse than all four treatments at every persistence on the slider, and the four are within nine per cent of each other everywhere.

Five treatments of an estimate above one, φ = 0.99, n = 25. The correction exceeds one on 38.4% of series at this setting. left where it lands: squared forecast error 17.461, average decay factor 0.9362 against a true 0.9415; capped at 0.995: squared forecast error 6.258, average decay factor 0.6481 against a true 0.9415; capped at 1 − 1/n: squared forecast error 6.424, average decay factor 0.5644 against a true 0.9415; correction scaled to fit: squared forecast error 6.424, average decay factor 0.5644 against a true 0.9415; correction refused where it leaves: squared forecast error 7.010, average decay factor 0.4848 against a true 0.9415.
Fig. 4 The setting where the ordering among the four reverses. The correction leaves the region on 38.4% of series and the fixed cap at 0.995 is now the best of them, because the truth is above the moving cap rather than below it.
The average decay factor each route produces, φ = 0.95, 6 steps ahead. The truth is φ^6 = 0.7351. no correction averages 0.3075 with a spread of 0.2697 and a squared forecast error of 6.5360; the formula, on the persistence averages 0.5808 with a spread of 0.3478 and a squared forecast error of 6.2220; the bootstrap, on the persistence averages 0.5985 with a spread of 0.3507 and a squared forecast error of 6.2189; the bootstrap, on the decay factor averages 0.4489 with a spread of 0.4035 and a squared forecast error of 6.8609. 800 series, 100 bootstrap refits each.
Fig. 5 What the same setting looks like when the correction is applied to the decay factor instead, which is the route correcting the forecast instead takes. It has no overflow problem — φ^h\hat\varphi^{h} has no upper bound to leave — and it is the worst of the four on squared error there, so the boundary difficulty and the accuracy difficulty are not traded against each other.

What this does to the earlier measurements

Three earlier essays quoted corrected estimates and every one of them was capped at 0.995 without saying so. It is worth being explicit about what that means for those numbers.

At the settings where those headline measurements were made — φ=0.8\varphi = 0.8 and 0.850.85 on fifty observations — the correction leaves the region on 0.3% and 1.9% of series, so the cap acts rarely and the numbers move by well under a per cent. The bias, root mean squared error and coverage figures those essays report are what they say.

At φ=0.95\varphi = 0.95 on twenty-five observations, which is the setting where the correction was found to win, the cap acts on nearly a third of series and the reported gain is partly the cap’s. That measurement is a measurement of the correction with a cap at 0.995, and a different implementation would have reported a different gain.

A quoted improvement from bias correction is an improvement from a pair of decisions, and the second one is almost never stated. This is not a criticism of those earlier essays so much as the reason for this one.

Five treatments of an estimate above one, φ = 0.95, n = 25. The correction exceeds one on 31.1% of series at this setting. left where it lands: squared forecast error 12.828, average decay factor 0.7974 against a true 0.7351; capped at 0.995: squared forecast error 5.680, average decay factor 0.5950 against a true 0.7351; capped at 1 − 1/n: squared forecast error 5.535, average decay factor 0.5256 against a true 0.7351; correction scaled to fit: squared forecast error 5.535, average decay factor 0.5256 against a true 0.7351; correction refused where it leaves: squared forecast error 5.868, average decay factor 0.4423 against a true 0.7351.
Fig. 6 The same five treatments scored on the persistence rather than on the forecast, where the ordering is different again: left where it lands gives a root mean squared error of 0.1858 against the moving cap’s 0.1689. Even here, where the explosive values are not raised to a power, doing nothing about them is the worst of the five.

What an implementation should print

The measurements support a short and unusually concrete recommendation, which is rare in this field.

Print the rate. An implementation that applies a bias correction knows, for the series in front of it, whether the correction left the region — and across a set of series it knows the share. That share is the number that says how much of the reported improvement is the cap’s. It costs one counter.

Name the cap. “Capped at 0.995” and “capped at 1 − 1/n” are six per cent apart in forecast accuracy at one setting and differently ordered at another, so the two are different estimators and a methods section that says “bias-corrected” has named neither.

And do not leave it. That is the one recommendation the measurements support at every setting on the slider: an uncapped corrected estimate is worse than all four alternatives at φ=0.8\varphi = 0.8, 0.90.9, 0.950.95 and 0.990.99, by factors of 1.35, 1.86, 2.32 and 2.79. Whatever is done about the overflow, doing nothing is the worst available.

The asymmetry between the second and third recommendations is the useful part. Which cap is a judgement and whether to cap is not, and only the first is the kind of question that needs a literature.

The general shape

The pattern is not about autoregressions, and it has now turned up four times in four unrelated places.

A procedure returns a value outside the space its output is supposed to live in. A variance estimated as a difference of positive quantities comes out negative. A shrinkage factor computed from a negative constant comes out above one and expands. A delta-method interval for the odds runs below zero. A bias-corrected persistence exceeds one.

Something is done about it, silently. Clamp at zero, clamp at one, take the positive part, cap at 0.995. In every case the clamp is arithmetically necessary and is a change of estimator.

And the samples it acts on are the informative ones. A variance estimate collapses to zero exactly where the borrowing it computes would be largest; a persistence correction leaves the region exactly where the bias it removes is largest. The clamp is not an edge case, it is the case.

The general repair is the one every one of those four cases points at: say what the clamp is, and measure what it costs. Both are cheap. The first is a line of documentation and the second is the figure at the top of this essay.

Why a clamp is a change of estimator rather than a repair

The phrase used throughout this essay — that each treatment is a choice of estimator — is worth defending, because a line saying the estimate is capped at 0.995 sounds like a numerical safeguard rather than a modelling decision.

An estimator is a function from data to a value. Applying a cap changes that function on a set of samples of positive probability, so it is a different function, and its sampling distribution is different in every respect: its bias, its variance, its shape and the probability that it takes any given value.

At φ=0.95\varphi = 0.95 on twenty-five observations the capped estimator has an atom at 0.995 carrying 31.1% of the probability. That is not a small perturbation of a continuous distribution; it is a distribution of a different kind, and every downstream quantity inherits it. The forecast, which is φ~h\tilde\varphi^{h}, has an atom at 0.9956=0.97040.995^{6} = 0.9704. The interval, which uses φ~2j\sum\tilde\varphi^{2j}, has an atom at the width that produces.

A third of the forecasts from this procedure are the same forecast, and nothing in the output says so. The reported decay factors would show a spike at 0.9705 that an analyst would read as a coincidence.

That is the same object the hierarchical field met at the other boundary — an estimator with an atom at the edge of its range, produced by a clamp that was arithmetically necessary — and the lesson transfers intact: look for the case where a procedure returns its own boundary, and ask how often that happens. Here the answer is a third of the time.

What is claimed here, and what is not

The claim is what a bias correction does when it produces a value outside the parameter space: that the threshold is φ^>(n1)/(n+3)\hat\varphi > (n-1)/(n+3) exactly; that the rate reaches 31.1% at φ=0.95\varphi = 0.95 on twenty-five observations and does not fall below 29.5% at two hundred observations when φ=0.99\varphi = 0.99; that the five standard treatments differ by a factor of 2.3 in squared forecast error and the four sensible ones by six per cent; and that the treatment with the smallest bias in the decay factor is the worst forecast of the five.

The threshold is algebra. Every rate and every squared error is three or four thousand series.

What stays out: maximum-likelihood estimation with the stationarity constraint imposed, which cannot leave the region by construction and has its own boundary behaviour when the maximum sits on the constraint; the Bayesian treatment, where a prior supported on the stationary region does the clamping continuously rather than at a point and is the repair the boundary problem naturally suggests; and models with a unit root deliberately, where a persistence of one is the hypothesis rather than an overflow and the whole framing of this essay does not apply.

Still open: what the interval is short by

The forecast interval has been reported by every essay here and repaired by none of them. It covers 88.4% where it claims 95% at the setting they work at, and the account so far has been that the persistence is biased downwards so the interval is too narrow.

That account is incomplete and the completion is measurable. There are at least three contributions — the persistence, the innovation variance, and the fact that the interval treats both as known — and they are not the same size, do not scale with the horizon the same way and do not add. Correcting all three recovers 4.20 of the 6.58 points, and what is left is not accounted for by any of them. That is what the interval is short by.

The check, and the refusal

Three claims are gated. That the correction leaves the region often enough at the setting drawn for the choice to matter, which is a floor on a rate rather than a claim about its exact value. That leaving the estimate where it lands is worse than every one of the four treatments — not merely than the best of them, which is the weaker claim a table sorted by squared error would support. And that the rate falls with the sample size at every persistence, which is the one monotonicity in the figure and is what makes the high-persistence exception readable as an exception.

The refusal is the uncapped treatment’s own decay factor: the largest one it produces must exceed one, which is a forecast that grows without limit rather than reverting. If that ever failed, the setting being drawn would be one where the correction never actually leaves the region, the five treatments would be five names for one estimator, and every difference in the figure would be simulation noise. It is the check that says the essay has a subject.

What links here

Computed from the collection, not written here: the essays that point at this one.

Shares its objects with

Essays that name at least two of the same things, and that neither author linked.

Named objects

A flat tag is an object no other essay names yet.

AutocorrelationBias correctionForecast errorForecast horizonMean squared errorMonte CarloParameter spacePlug in estimateStationarity