I have a bivariate time series
z_1t is the change in monthly US treasury bills (maturity 3 months) and
z_2t the inflation rate, in percentage, of the U.S. monthly consumer price index (CPI). CPI used is the consumer price index for all urban consumers: all items (CPIAUCSL). The original data are downloaded from the Federal Reserve Bank of St.Louis. The CPI rate is 100 times the first difference of the log CPI index. I want to fit the specified VAR model and simplify the fit by a command R (
refVar from package
restrict from package
vars) with threshold 1.65.
What I did until now is the following:
y <- diff(zt[,3]) lot(y, type="l", ylab="tb3m") # difference x <- diff(log(zt[,4])) plot(x, type="l", ylab="CPI rate") new <- cbind(x, y) # order selection gives VAR(6) VARselect(new, lag.max=9, type="const") data1 <- data[,c("tb3m","cpiaucsl")] fit <- VAR(data1,p=6) fit restrict(fit, method="ser", thresh=1.65, resmat=T)
VAR don't give me the right results or the same coefficients of the Var model in the answers in the pdf.