est.VARX.ar {dse1} | R Documentation |
Estimate a VAR TSmodel with (optionally) an exogenous input.
est.VARX.ar(data, subtract.means=F, re.add.means=T, standardize=F, unstandardize=T, aic=T, max.lag=NULL, method="yule-walker", warn=T)
data |
A TSdata object. |
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. |
This function uses the 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.
A TSestModel object containing a TSmodel object which is aVAR model.
P.D.Gilbert (1993) State Space and ARMA models: An overview of estimation and reduction.
est.SS.from.VARX
est.SS.Mittnik
bft
est.VARX.ls
if(is.R()) data("eg1.DSE.data.diff", package="dse1") model <- est.VARX.ar(eg1.DSE.data.diff)