VAR.Rest | R Documentation |
Estimation of VAR with 0 restrictions on parameters
VAR.Rest(x, p, restrict, type = "const", method = "gls")
x |
data matrix in column |
p |
VAR order |
restrict |
Restriction matrix under H0 |
type |
"const" for the AR model with intercept only, "const+trend" for the AR model with intercept and trend |
method |
"ols" for OLS estimation, "gls" for EGLS estimation |
Restriction matrix is of m by 3 matrix where m is the number of restrictions. A typical row of this matrix (k,i,j), which means that (i,j) element of Ak matrix is set to 0. Ak is a VAR coefficient matrix (k = 1,....p).
coef |
coefficient matrix |
resid |
matrix of residuals |
sigu |
residual covariance matrix |
zmat |
data matrix |
tstat |
matrix of tratio corresponding to coef matrix |
See Chapter 5 of Lutkepohl
Jae H. Kim
Lutkepohl, H. 2005, New Introduction to Multiple Time Series Analysis, Springer
data(dat)
#replicating Section 5.2.10 of Lutkepohl (2005)
restrict = rbind( c(1,1,2),c(1,1,3),c(1,2,1),c(1,2,2), c(1,3,1),
c(2,1,1), c(2,1,2),c(2,1,3), c(2,2,2), c(2,2,3),c(2,3,1), c(2,3,3),
c(3,1,1), c(3,1,2), c(3,1,3), c(3,2,1), c(3,2,2), c(3,2,3), c(3,3,1),c(3,3,3),
c(4,1,2), c(4,1,3), c(4,2,1), c(4,2,2), c(4,2,3), c(4,3,1),c(4,3,2),c(4,3,3))
M= VAR.Rest(dat,p=4,restrict,type="const",method="gls")
print(M$coef)
print(M$tstat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.