est.VARX.ar
Estimate a VAR TSmodel
Description
Estimate a VAR TSmodel with (optionally) an exogenous input.
Usage
est.VARX.ar(data,subtract.means=F,re.add.means=T, standardize=F, unstandardize=T, aic=T, max.lag=NULL, method='yule-walker')
Required Arguments
- model
-
An object with the structure of an object of class TSdata (see TSdata).
Optional Arguments
- subtract.means
-
If T subtract the means from the data before estimation.
- re.add.means
-
If T the model is adjusted for the non-zero mean data when returned. If
subtract.means is also T then the mean is added back to the data.
- standardize
-
Note that the mean is not subtracted unless subtract.means is T.
A VAR model in an object of class TSestModel.
- unstandardize
-
If T and standardize is T then the returned model is adjusted to
correspond to the original data.
Value
A VAR model in an object of class TSestModel.
Details
This function uses the Splus function ar. The ar
method does not support trend estimation (as in est.VARX.ls).
If aic=T 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 T to get back to a model for the
original data.
REFERENCES
P.D.Gilbert (1992) State Space and ARMA models: An overview of
estimation and reduction.
See Also
Examples
model <- est.VARX.ar(data)
return to Table of Contents