Learn R Programming

fable (version 0.4.0)

VARIMA: Estimate a VARIMA model

Description

Estimates a VARIMA model of a given order.

Usage

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

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

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

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

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

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

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

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

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

Value

A model specification.

A one row tibble summarising the model's fit.

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.

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)

pThe order of the non-seasonal auto-regressive (AR) terms. If multiple values are provided, the one which minimises ic will be chosen.
dThe order of integration for non-seasonal differencing. If multiple values are provided, one of the values will be selected via repeated KPSS tests.
qThe 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))

Details

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

See Also

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

Examples

Run this code
if (FALSE) { # requireNamespace("tsibbledata", quietly = TRUE)
library(tsibbledata)

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

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

fit
}
if (FALSE) { # requireNamespace("tsibbledata", quietly = TRUE)

fit %>%
  forecast(h = 50) %>%
  autoplot(tail(aus_production, 100))
}
if (FALSE) { # requireNamespace("tsibbledata", quietly = TRUE)

fitted(fit)
}
if (FALSE) { # requireNamespace("tsibbledata", quietly = TRUE)
residuals(fit)
}
if (FALSE) { # requireNamespace("tsibbledata", quietly = TRUE)
tidy(fit)
}
if (FALSE) { # requireNamespace("tsibbledata", quietly = TRUE)
glance(fit)
}
if (FALSE) { # requireNamespace("tsibbledata", quietly = TRUE)
report(fit)
}
if (FALSE) { # requireNamespace("tsibbledata", quietly = TRUE)
generate(fit, h = 10)
}
if (FALSE) { # requireNamespace("tsibbledata", quietly = TRUE)
IRF(fit, h = 10, impulse = "Beer")
}

Run the code above in your browser using DataLab