powered by
This function returns least-squares estimation results for VAR(p) model
VAR.est(x, p, type = "const")
coefficient matrix
matrix of residuals
residual covariance matrix
data moment matrix
matrix of tratio corresponding to coef matrix
data matrix in column
AR order
"const" for the AR model with intercept only, "const+trend" for the AR model with intercept and trend
Jae H. Kim
VAR estimation
Lutkepohl, H. 2005, New Introduction to Multiple Time Series Analysis, Springer
#replicating Section 3.2.3 of of Lutkepohl (2005) data(dat) M=VAR.est(dat,p=2,type="const") print(M$coef) print(M$tratio)
Run the code above in your browser using DataLab