Skip to contents

The yardsticks every other model must beat.

Usage

model_mean()

model_naive()

model_drift()

model_seasonal_naive(growth = FALSE)

Arguments

growth

Scale by the growth of the last cycle.

Value

A model specification, to use with fit_model(), forecast_model() or backtest().

Details

  • model_mean(): the mean of the history.

  • model_naive(): the last value (random walk).

  • model_drift(): the last value plus the average change (random walk with drift).

  • model_seasonal_naive(): the same season of the last cycle; with growth = TRUE, scaled by the growth of the last cycle over the one before.

Examples

forecast_model(model_seasonal_naive(), AirPassengers, h = 3)
#>      Jan Feb Mar
#> 1961 417 391 419