estVARXar: Estimate a VAR TSmodel

Description Usage Arguments Details Value References See Also Examples

Description

Estimate a VAR TSmodel with (optionally) an exogenous input.

Usage

1
2
    estVARXar(data, subtract.means=FALSE,  re.add.means=TRUE, standardize=FALSE, 
         unstandardize=TRUE, aic=TRUE, max.lag=NULL, method="yule-walker", warn=TRUE)

Arguments

data

A TSdata object.

subtract.means

If TRUE subtract the means from the data before estimation.

re.add.means

If TRUE the model is adjusted for the non-zero mean data when returned. If subtract.means is also TRUE then the mean is added back to the data.

standardize

Note that the mean is not subtracted unless subtract.means is TRUE. A VAR model in an object of class TSestModel.

unstandardize

If TRUE and standardize is TRUE then the returned model is adjusted to correspond to the original data.

aic

Passed to function ar.

max.lag

The maximum number of lags that should be considered.

method

Passed to function ar.

warn

If TRUE certain warning message are suppressed.

Details

This function estimates a VAR model with exogenous variable using ar(). Residuals,etc, are calculated by evaluating the estimated model with ARMA. The procedure ar is used by combine exogeneous variables and endogenous variable and estimating as if all variables were endogenous. The estVARXar method does not support trend estimation (as in estVARXls).

If aic=TRUE the number of lags is determined by an AIC statistic (see ar). If an exogenous (input) variable is supplied the input and output are combined (i.e.- both treated as outputs) for estimation, and the resulting model is converted back by transposing the exogenous variable part of the polynomial and discarding inappropriate blocks. Residuals,etc, are calculated by evaluating the estimated model as a TSmodel/ARMA with the data (ie. residuals are not the residuals from the regression).

Note: ar uses a Yule-Walker approach (uses autocorrelations) so effectively the model is for data with means removed. Thus subtract.means does not make much difference and re.add.means must be TRUE to get back to a model for the original data.

The conventon for AR(0) and sign are changed to ARMA format. Data should be of class TSdata. The exog. variable is shifted so contemporaneous effects enter. the model for the exog. variable (as estimated by ar() is discarded.

Value

A TSestModel object containing an ARMA TSmodel object. The model has no MA portion so it is a VAR model.

References

Gilbert, P. D. (1993) State space and ARMA models: An overview of the equivalence. Working paper 93-4, Bank of Canada. Available at http://www.bankofcanada.ca/1993/03/publications/research/working-paper-199/

Gilbert, P. D. (1995) Combining VAR Estimation and State Space Model Reduction for Simple Good Predictions. J. of Forecasting: Special Issue on VAR Modelling. 14:229–250.

See Also

estSSfromVARX estSSMittnik bft estVARXls estMaxLik ar DSE.ar

Examples

1
2
data("eg1.DSE.data.diff", package="dse")
model <- estVARXar(eg1.DSE.data.diff)

Example output

Loading required package: tfplot
Loading required package: tframe

Attaching package: 'dse'

The following objects are masked from 'package:stats':

    acf, simulate

dse documentation built on March 26, 2020, 7:12 p.m.