Learn R Programming

VAR.etp (version 1.1)

VAR.Rest: VAR parameter estimation with parameter restrictions

Description

Estimation of VAR with 0 restrictions on parameters

Usage

VAR.Rest(x, p, restrict, type = "const", method = "gls")

Value

coef

coefficient matrix

resid

matrix of residuals

sigu

residual covariance matrix

zmat

data matrix

tstat

matrix of tratio corresponding to coef matrix

Arguments

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

Author

Jae H. Kim

Details

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

References

Lutkepohl, H. 2005, New Introduction to Multiple Time Series Analysis, Springer

Examples

Run this code
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)

Run the code above in your browser using DataLab