Skip to contents

One model, trained for a single step, applied repeatedly with its own forecasts fed back in as lags. The base learner is ordinary least squares on the lag design, so the STRATEGY – which is what the book teaches – is what is demonstrated, and nothing is fitted at random.

Usage

morie_recmulti(x, lags, horizon)

Arguments

x

the series

lags

positive integer lags

horizon

steps to forecast

Value

list(forecast, horizon, nmodels, ntrain, first, last, mean)

Examples

morie_recmulti(x = c(1, 2, 3, 4, 5, 6, 7, 8), lags = 5L, horizon = 5L)
#> $forecast
#> [1]  9 10 11 12 13
#> 
#> $horizon
#> [1] 5
#> 
#> $nmodels
#> [1] 1
#> 
#> $ntrain
#> [1] 3
#> 
#> $first
#> [1] 9
#> 
#> $last
#> [1] 13
#> 
#> $mean
#> [1] 11
#>