Skip to contents

Carries the last observation forward, or the last observation from the same point in the season.

Usage

morie_joseph_naive_forecast(y, horizon = 1, season = NULL)

Arguments

y

series.

horizon

steps ahead.

season

seasonal period; NULL for the plain naive forecast.

Value

list with forecast, method_used, last_value, in_sample_mae.

Details

This is the benchmark every other method has to beat, and it is not a straw man: for a random walk it is the OPTIMAL forecast, so a model that fails to beat it on a near-random-walk series is not underperforming, it is being told the series has no structure. The in-sample mean absolute change returned here is the MASE denominator.

References

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

Examples

morie_joseph_naive_forecast(c(3, 5, 4, 6), horizon = 2)$forecast
#> [1] 6 6