Skip to contents

Extrapolates the straight line through the FIRST and LAST observations: the drift is \((y_n - y_1)/(n-1)\) and everything in between is ignored.

Usage

morie_drift_forecast(y, h = 1)

Arguments

y

series.

h

steps ahead.

Value

list with forecast, drift, se, lower, upper, sigma.

Details

That is not an approximation, it is the estimator – which is why a single unusual endpoint moves the whole forecast, and why the method should be looked at rather than trusted when either end of the series is atypical. Interval width grows with \(\sqrt{h(1 + h/(n-1))}\), faster than the naive forecast's \(\sqrt h\), because the drift itself is estimated.

References

Hyndman, R. J. and Athanasopoulos, G. (2021). Forecasting: Principles and Practice, 3rd ed., Sec. 5.2.

Examples

round(morie_drift_forecast(c(1, 3, 2, 5, 7), h = 3)$forecast, 2)
#> [1]  8.5 10.0 11.5