arima_forecastor: arima forecastor

Description Usage Arguments Details Value Examples

View source: R/estimators_forecastors.R

Description

Envelope function that forecasts arima model

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
arima_forecastor(
  fit,
  test_sample = NA,
  predicted = "",
  predicted_ = "",
  options = "",
  predictors = "",
  h = 1,
  frequency = 1
)

Arguments

fit

fitted arima model

test_sample

tsibble with predictors for test sample

predicted

name of all the predicted variables. Not used as is determined by the fit.

predicted_

name of the perdicted variable. Not used as is determined by the fit.

options

character with options separated by comma not supparted

predictors

character with predictors separated by plus or comma, no predictors by default

h

forecasting horizon

frequency

time series frequency may be it is needed for forecasting with regressors, may check later

Details

Envelope function that forecasts arima model.

Value

forecast object

Examples

1
2
3
4
5
train_sample = tsibble::tsibble(date = lubridate::ymd("2017-01-01") + months(0:99),
    y = arima.sim(n = 100, model = list(ar = 0.7)), x = 1:100)
fit = arima_estimator(train_sample, "y", "p=2,d=0,q=0", "x")
test_sample = tsibble::tsibble(date = lubridate::ymd("2030-01-01") + months(0:1), x = 5:6)
arima_forecastor(fit, test_sample, predictors = "x", h = 2, frequency = 12)

kassandra-ru/kassandr documentation built on Jan. 1, 2022, 7:39 a.m.