VARIMA: Estimate a VARIMA model

View source: R/VARIMA.R

VARIMAR Documentation

Estimate a VARIMA model

Description

Estimates a VARIMA model of a given order.

Usage

VARIMA(formula, identification = c("kronecker_indices", "none"), ...)

## S3 method for class 'VARIMA'
forecast(
  object,
  new_data = NULL,
  specials = NULL,
  bootstrap = FALSE,
  times = 5000,
  ...
)

## S3 method for class 'VARIMA'
fitted(object, ...)

## S3 method for class 'VARIMA'
residuals(object, ...)

## S3 method for class 'VARIMA'
tidy(x, ...)

## S3 method for class 'VARIMA'
glance(x, ...)

## S3 method for class 'VARIMA'
report(object, ...)

## S3 method for class 'VARIMA'
generate(x, new_data, specials, ...)

## S3 method for class 'VARIMA'
IRF(x, new_data, specials, impulse = NULL, orthogonal = FALSE, ...)

Arguments

formula

Model specification (see "Specials" section).

identification

The identification technique used to estimate the model.

...

Further arguments for arima

object

A model for which forecasts are required.

new_data

A tsibble containing the time points and exogenous regressors to produce forecasts for.

specials

(passed by fabletools::forecast.mdl_df()).

bootstrap

If TRUE, then forecast distributions are computed using simulation with resampled errors.

times

The number of sample paths to use in estimating the forecast distribution when bootstrap = TRUE.

x

A fitted model.

impulse

A character string specifying the name of the variable that is shocked (the impulse variable).

orthogonal

If TRUE, orthogonalised impulse responses will be computed.

Details

Exogenous regressors and common_xregs can be specified in the model formula.

Value

A model specification.

A one row tibble summarising the model's fit.

Specials

pdq

The pdq special is used to specify non-seasonal components of the model.

pdq(p = 0:5, d = 0:2, q = 0:5)
p The order of the non-seasonal auto-regressive (AR) terms. If multiple values are provided, the one which minimises ic will be chosen.
d The order of integration for non-seasonal differencing. If multiple values are provided, one of the values will be selected via repeated KPSS tests.
q The order of the non-seasonal moving average (MA) terms. If multiple values are provided, the one which minimises ic will be chosen.

xreg

Exogenous regressors can be included in an VARIMA model without explicitly using the xreg() special. Common exogenous regressor specials as specified in common_xregs can also be used. These regressors are handled using stats::model.frame(), and so interactions and other functionality behaves similarly to stats::lm().

The inclusion of a constant in the model follows the similar rules to stats::lm(), where including 1 will add a constant and 0 or -1 will remove the constant. If left out, the inclusion of a constant will be determined by minimising ic.

xreg(...)
... Bare expressions for the exogenous regressors (such as log(x))

See Also

MTS::VARMA(), MTS::Kronfit().

Examples


library(tsibbledata)

aus_production %>% 
  autoplot(vars(Beer, Cement))

fit <- aus_production %>%
  model(VARIMA(vars(Beer, Cement) ~ pdq(4,1,1), identification = "none"))

fit



fit %>%
  forecast(h = 50) %>%
  autoplot(tail(aus_production, 100))



fitted(fit)


residuals(fit)


tidy(fit)


glance(fit)


report(fit)


generate(fit, h = 10)


IRF(fit, h = 10, impulse = "Beer")


fable documentation built on Sept. 25, 2024, 1:08 a.m.