Skip to contents

The hybrid the book names: like Direct, a separate model per horizon; like Recursive, each successive model may also use the forecasts already produced, so the input space GROWS by one column at every step.

Usage

morie_dirrec(x, lags, horizon)

Arguments

x

the series

lags

positive integer lags

horizon

steps to forecast

Value

list(forecast, horizon, nmodels, ncolsfirst, ncolslast, first, last, mean)

Examples

morie_dirrec(x = c(1, 2, 3, 4, 5, 6, 7, 8), lags = 3L, horizon = 5L)
#> $forecast
#> [1]  9.00000 10.00000 11.00000 12.00000 15.18911
#> 
#> $horizon
#> [1] 5
#> 
#> $nmodels
#> [1] 5
#> 
#> $ncolsfirst
#> [1] 1
#> 
#> $ncolslast
#> [1] 5
#> 
#> $first
#> [1] 9
#> 
#> $last
#> [1] 15.18911
#> 
#> $mean
#> [1] 11.43782
#>