Skip to contents

Produces multi-step-ahead forecasts with prediction intervals. The returned object keeps forecast values clearly separate from the observed (model) values, and the interval widths grow with the forecast horizon.

Usage

morie_ts_forecast(model, h = 10L, level = 0.95, xreg = NULL)

Arguments

model

A morie_ts_model.

h

Forecast horizon (number of steps ahead).

level

Prediction-interval coverage (default 0.95).

xreg

Future exogenous regressors (required if the model used xreg), with h rows.

Value

A morie_ts_forecast: mean, lower, upper, se (each length h), plus the observed series.

Examples

m <- morie_ts_arima(cumsum(rnorm(80)), order = c(1, 1, 0))
fc <- morie_ts_forecast(m, h = 12)