VARXFit {BigVAR} | R Documentation |
Fit a VAR or VARX model by least squares
VARXFit(Y, p, IC, VARX = NULL)
Y |
a t \times k multivariate time series |
p |
maximum lag order |
IC |
Information criterion indicator, if set to |
VARX |
a list of VARX specifications (as in |
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.
Returns a list with four entries:
"Bhat"Estimated k\times kp+ms coefficient matrix
"SigmaUEstimated k\times k residual covariance matrix
"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
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.
constructModel
, cv.BigVAR
,BigVAR.fit
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))