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 t \times k multivariate time series p maximum lag order IC Information criterion indicator, if set to NULL, it will fit a least squares VAR(X) of orders p and s. Otherwise, if set to "AIC" or "BIC" it return the model with lag orders that minimize the given IC. VARX a list of VARX specifications (as in constructModel (or NULL )

### 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 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

### 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.

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))



[Package BigVAR version 1.0.6 Index]