library(vars) data(finland) #lrm1 Logarithm of real money, M1. #lny Logarithm of real income. #lnmr Marginal rate of interest. #difp Inflation rate sjf <- finland sjf.vecm1 <- ca.jo(sjf, ecdet = "none", type = "eigen", K = 2,spec = "longrun", season = 4) summary(sjf.vecm1) sjf.vecm2 <- ca.jo(sjf, ecdet = "none", type = "eigen", K = 2,spec = "transitory", season = 4) summary(sjf.vecm2) sjf.vecm1.ls <- cajools(sjf.vecm1) summary(sjf.vecm1.ls) sjf.vecm2.ls <- cajools(sjf.vecm2) summary(sjf.vecm2.ls) sjf.vecm1.rls <- cajorls(sjf.vecm1, r = 2) summary(sjf.vecm1.rls$rlm) sjf.vecm.rls$beta data(denmark) #period #Time index from 1974:Q1 until 1987:Q3. #LRM Logarithm of real money, M2. #LRY Logarithm of real income. #LPY Logarithm of price deflator. #IBO Bond rate. #IDE Bank deposit rate. sjd <- denmark[, c("LRM", "LRY", "IBO", "IDE")] sjd.vecm <- ca.jo(sjd, ecdet = "const", type="eigen", K=2, spec="longrun",season=4) HD0 <- matrix(c(-1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1), c(5,4)) summary(blrtest(sjd.vecm, H=HD0, r=1)) DA <- matrix(c(1,0,0,0), c(4,1)) summary(alrtest(sjd.vecm, A=DA, r=1)) HD1 <- matrix(c(1, -1, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 1), c(5,3)) DA <- matrix(c(1,0,0,0, 0, 1, 0, 0, 0, 0, 0, 1), c(4,3)) summary(ablrtest(sjd.vecm, H=HD1, A=DA, r=1)) data(UKpppuip) #p1 UK wholesale price index. #p2 Trade weighted foreign whole sale price index. #e12 UK effective exchange rate. #i1 Three-month treasury bill rate in the UK. #i2 Three-month Eurodollar interest rate. #dpoil0 World oil price at periodt. #dpoil1 World oil price at periodt-1. attach(UKpppuip) dat1 <- cbind(p1, p2, e12, i1, i2) dat2 <- cbind(doilp0, doilp1) H1 <- ca.jo(dat1, type='trace', K=2, season=4, dumvar=dat2) H51 <- c(1, -1, -1, 0, 0) H52 <- c(0, 0, 0, 1, -1) summary(bh5lrtest(H1, H=H51, r=2)) summary(bh5lrtest(H1, H=H52, r=2)) H1 <- ca.jo(dat1, type='trace', K=2, season=4, dumvar=dat2) H6 <- matrix(c(1,0,0,0,0, 0,1,0,0,0, 0,0,1,0,0), c(5,3)) summary(bh6lrtest(z=H1, H=H6, r=2, r1=1, conv.val=0.0001, max.iter=50))