VARXFit {BigVAR} | R Documentation |
Fit a VAR or VARX model by least squares
Description
Fit a VAR or VARX model by least squares
Usage
VARXFit(Y, p, IC, VARX = NULL)
Arguments
Y |
a |
p |
maximum lag order |
IC |
Information criterion indicator, if set to |
VARX |
a list of VARX specifications (as in |
Details
This function uses a modified form of the least squares technique proposed by Neumaier and Schneider (2001). It fits a least squares VAR or VARX via a QR decomposition that does not require explicit matrix inversion. This results in improved computational performance as well as numerical stability over the conventional least squares approach.
Value
Returns a list with four entries:
'Bhat' |
Estimated |
'SigmaU |
Estimated |
'phat' |
Selected lag order for VAR component |
'shat' |
Selected lag order for VARX component |
'Y' |
multivariate time series retained for prediction purposes |
'Y' |
number of endogenous (modeled) time series |
References
Neumaier, Arnold, and Tapio Schneider. 'Estimation of parameters and eigenmodes of multivariate autoregressive models.' ACM Transactions on Mathematical Software (TOMS) 27.1 (2001): 27-57.
See Also
constructModel
, cv.BigVAR
,BigVAR.fit
Examples
data(Y)
# fit a VAR_3(3)
mod <- VARXFit(Y,3,NULL,NULL)
# fit a VAR_3 with p= 6 and lag selected according to AIC
modAIC <- VARXFit(Y,6,'AIC',NULL)
# Fit a VARX_{2,1} with p=6, s=4 and lags selected by BIC
modXBIC <- VARXFit(Y,6,'BIC',list(k=1,s=4))