6 Identification of the long-run structure

This chapter contains the replication of the material of Chapter 12 of Juselius (2006).


6.1 Just-identified long-run structures

Load the function ca_jo_jus06_hr3_fun() from GitHub.

source("https://raw.githubusercontent.com/mmoessler/juselius-2006/main/R/ca_jo_jus06_hr3_fun.R")

Note, the function ca_jo_jus06_hr3_fun() is based on the function bh6lrtest() from the library urca (see also Pfaff (2008)) and extended such that restriction can be imposed on each of the three cointegrating relationships individually.

Thus, the switching algorithm proposed by Johansen and Juselius (1992) is applied by iterating over all three cointegrating relationships. This allows us to estimate just-identified and over-identified long-run structures as in Chapter 12.

Check the code on GitHub (mmoessler/juselius-2006/main/R/ca_jo_jus06_fun.R) for more information.


6.1.1 \(\mathcal{H}_{S.1}\) in Table 12.1 of Juselius (2006)

Construct the design matrices \(H_i\) for \(i=1,2,3\).

H1 <- matrix(c( 1, 0, 0, 0,
                0, 1, 0, 0,
                0, 0, 0, 0,
                0, 0, 0, 0,
                0, 0, 1, 0,
                0, 0, 0, 1), nrow = 6, ncol = 4, byrow = TRUE)

H2 <- matrix(c( 0, 0, 0, 0,
                1, 0, 0, 0,
                0, 1, 0, 0,
                0, 0, 0, 0,
                0, 0, 1, 0,
                0, 0, 0, 1), nrow = 6, ncol = 4, byrow = TRUE)

H3 <- matrix(c( 0, 0, 0, 0,
                1, 0, 0, 0,
                0, 0, 0, 0,
                0, 1, 0, 0,
                0, 0, 1, 0,
                0, 0, 0, 1), nrow = 6, ncol = 4, byrow = TRUE)

Estimate the (just) identified cointegrating and adjustment coefficients.

z <- ca.jo.res.02
# z$P <- 6

b.s1.res <- ca_jo_jus06_hr3_fun(z = z,
                                H1 = H1, H2 = H2, H3 = H3,
                                nor.id1 = 1, nor.id2 = 3, nor.id3 = 4)

Compare results for \(\widehat{\beta}\) (see \(\mathcal{H}_{S.1}\) in Table 12.1 of Juselius (2006))

beta.norm <- b.s1.res$V
round(beta.norm, 2)
##       [,1] [,2]  [,3]
## [1,]  1.00 0.00  0.00
## [2,] -0.94 0.04  0.01
## [3,]  0.00 1.00  0.00
## [4,]  0.00 0.00  1.00
## [5,]  3.04 0.20 -0.63
## [6,] -0.27 0.01 -0.01

Compare results for \(\widehat{\alpha}\) (see \(\mathcal{H}_{S.1}\) in Table 12.1 of Juselius (2006))

alpha.norm <- b.s1.res$W
round(alpha.norm, 2)
##          [,1]  [,2]  [,3]
## Lm3rC.d -0.22 -0.56  2.98
## Lyr.d    0.05 -0.29 -1.84
## Dpy.d   -0.01 -0.82 -0.47
## Rm.d     0.00  0.03 -0.09
## Rb.d     0.00  0.02  0.13

Compute standard error for \(\widehat{\beta}\)

H <- matrix(rep(0, (3*6)*(3*4-3)), nrow = (3*6), ncol = (3*4-3))

H[( 0+1): 6,(0+1):3] <- H1[,-1]
H[( 6+1):12,(3+1):6] <- H2[,-2]
H[(12+1):18,(6+1):9] <- H3[,-2]
Sig.e <- b.s1.res$z$DELTA
S11   <- b.s1.res$z$SKK

TT <- nrow(b.s1.res$z$R0)
cov.beta <- H %*% solve( t(H) %*% ( (t(alpha.norm) %*% solve(Sig.e) %*% alpha.norm) %x% S11 ) %*% H ) %*% t(H) / TT

Compare with standard error for \(\widehat{\beta}\) (see \(\mathcal{H}_{S.1}\) in Table 12.1 of Juselius (2006))

matrix(round(c(beta.norm)/sqrt(diag(cov.beta)), 2), nrow = 6, ncol = 3)
##       [,1] [,2]  [,3]
## [1,]   Inf  NaN   NaN
## [2,] -6.55 3.24  2.06
## [3,]   NaN  Inf   NaN
## [4,]   NaN  NaN   Inf
## [5,]  1.51 1.16 -7.03
## [6,] -8.08 5.11 -5.12

Compute standard error for \(\widehat{\alpha}\)

cov.alpha <- Sig.e %x% solve(t(beta.norm) %*% S11 %*% beta.norm) / TT

Compare with standard error for \(\widehat{\alpha}\) (see \(\mathcal{H}_{S.1}\) in Table 12.1 of Juselius (2006))

round(alpha.norm/matrix(sqrt(diag(cov.alpha)), nrow = 5, ncol = 3, byrow = TRUE), 2)
##          [,1]  [,2]  [,3]
## Lm3rC.d -4.78 -1.31  2.66
## Lyr.d    1.91 -1.16 -2.78
## Dpy.d   -0.72 -5.51 -1.21
## Rm.d    -0.72  1.50 -1.83
## Rb.d     0.86  0.75  1.90

6.1.2 \(\mathcal{H}_{S.2}\) in Table 12.1 of Juselius (2006)

Construct the design matrices \(H_i\) for \(i=1,2,3\).

H1 <- matrix(c( 1, 0, 0, 0,
               -1, 0, 0, 0,
                0, 0, 0, 0,
                0, 1, 0, 0,
                0, 0, 1, 0,
                0, 0, 0, 1), nrow = 6, ncol = 4, byrow = T)

H2 <- matrix(c( 0, 0, 0, 0,
                1, 0, 0, 0,
                0, 1, 0, 0,
                0, 0, 1, 0,
                0, 0,-1, 0,
                0, 0, 0, 1), nrow = 6, ncol = 4, byrow = T)

H3 <- matrix(c( 0, 0, 0, 0,
                1, 0, 0, 0,
                0, 1, 0, 0,
                0, 0, 1, 0,
                0, 0, 0, 0,
                0, 0, 0, 1), nrow = 6, ncol = 4, byrow = T)

Estimate the (just) identified cointegrating and adjustment coefficients.

z <- ca.jo.res.02

b.s2.res <- ca_jo_jus06_hr3_fun(z = z,
                                H1 = H1, H2 = H2, H3 = H3,
                                nor.id1 = 1, nor.id2 = 3, nor.id3 = 3)

Compare results for \(\widehat{\beta}\) (see \(\mathcal{H}_{S.2}\) in Table 12.1 of Juselius (2006))

beta.norm <- b.s2.res$V
round(beta.norm, 2)
##       [,1]  [,2] [,3]
## [1,]  1.00  0.00 0.00
## [2,] -1.00  0.03 0.04
## [3,]  0.00  1.00 1.00
## [4,] -4.70 -0.54 0.32
## [5,]  5.99  0.54 0.00
## [6,] -0.24  0.02 0.01

Compare results for \(\widehat{\alpha}\) (see \(\mathcal{H}_{S.2}\) in Table 12.1 of Juselius (2006))

alpha.norm <- b.s2.res$W
round(alpha.norm, 2)
##          [,1]  [,2]  [,3]
## Lm3rC.d -0.22 -2.47  1.91
## Lyr.d    0.05  1.75 -2.04
## Dpy.d   -0.01  0.31 -1.12
## Rm.d     0.00  0.12 -0.09
## Rb.d     0.00 -0.15  0.17

Compute standard error for \(\widehat{\beta}\)

H <- matrix(rep(0, (3*6)*(3*4-3)), nrow = (3*6), ncol = (3*4-3))

H[( 0+1): 6,(0+1):3] <- H1[,-1]
H[( 6+1):12,(3+1):6] <- H2[,-2]
H[(12+1):18,(6+1):9] <- H3[,-2]
Sig.e <- b.s2.res$z$DELTA
S11   <- b.s2.res$z$SKK

TT <- nrow(b.s2.res$z$R0)
cov.beta <- H %*% solve( t(H) %*% ( (t(alpha.norm) %*% solve(Sig.e) %*% alpha.norm) %x% S11 ) %*% H ) %*% t(H) / TT

Compare with standard error for \(\widehat{\beta}\) (see \(\mathcal{H}_{S.1}\) in Table 12.1 of Juselius (2006))

matrix(round(c(beta.norm)/sqrt(diag(cov.beta)), 2), nrow = 6, ncol = 3)
##       [,1]  [,2] [,3]
## [1,]   Inf   NaN  NaN
## [2,]  -Inf  3.81 4.80
## [3,]   NaN   Inf  Inf
## [4,] -1.44 -4.53 2.99
## [5,]  2.40  4.53  NaN
## [6,] -7.46  6.58 5.14

Compute standard error for \(\widehat{\alpha}\)

cov.alpha <- Sig.e %x% solve(t(beta.norm) %*% S11 %*% beta.norm) / TT

Compare with standard error for \(\widehat{\alpha}\) (see \(\mathcal{H}_{S.1}\) in Table 12.1 of Juselius (2006)

round(alpha.norm/matrix(sqrt(diag(cov.alpha)), nrow = 5, ncol = 3, byrow = TRUE), 2)
##          [,1]  [,2]  [,3]
## Lm3rC.d -4.78 -2.02  1.49
## Lyr.d    1.91  2.43 -2.70
## Dpy.d   -0.72  0.73 -2.54
## Rm.d    -0.72  2.31 -1.70
## Rb.d     0.86 -2.13  2.28

6.2 Over-Identified structures

6.2.1 \(\mathcal{H}_{S.3}\) in Table 12.3 of Juselius (2006)

Construct the design matrices \(H_i\) for \(i=1,2,3\).

H1 <- matrix(c( 1, 0,
               -1, 0,
                0, 0,
                0, 0,
                0, 0,
                0, 1), nrow = 6, ncol = 2, byrow = TRUE)

H2 <- matrix(c( 0, 0, 0,
                1, 0, 0,
                0, 1, 0,
                0, 0, 0,
                0, 0, 0,
                0, 0, 1), nrow = 6, ncol = 3, byrow = TRUE)

H3 <- matrix(c( 0,  0, 0,
                0,  0, 0,
                1,  0, 0,
               -1, -1, 0,
                0,  1, 0,
                0,  0, 1), nrow = 6, ncol = 3, byrow = TRUE)

Estimate the (over) identified cointegrating and adjustment coefficients.

z <- ca.jo.res.02

b.s3.res <- ca_jo_jus06_hr3_fun(z = z,
                                H1 = H1, H2 = H2, H3 = H3,
                                nor.id1 = 1, nor.id2 = 3, nor.id3 = 4, df = 4)

Compare results for \(\widehat{\beta}\) (see \(\mathcal{H}_{S.3}\) in Table 12.3 of Juselius (2006))

beta.norm <- b.s3.res$V
round(beta.norm, 2)
##       [,1] [,2]  [,3]
## [1,]  1.00 0.00  0.00
## [2,] -1.00 0.03  0.00
## [3,]  0.00 1.00 -0.20
## [4,]  0.00 0.00  1.00
## [5,]  0.00 0.00 -0.80
## [6,] -0.34 0.01 -0.01

Compare results for \(\widehat{\alpha}\) (see \(\mathcal{H}_{S.3}\) in Table 12.3 of Juselius (2006))

alpha.norm <- b.s3.res$W
round(alpha.norm, 2)
##          [,1]  [,2]  [,3]
## Lm3rC.d -0.21  0.24  3.38
## Lyr.d    0.06 -0.44 -1.40
## Dpy.d    0.00 -0.84 -0.29
## Rm.d     0.00  0.02 -0.07
## Rb.d     0.00  0.05  0.13

Compare value for LR-test on page 220 of Juselius (2006)

round(b.s3.res$teststat, 2)
## [1] 4.05
round(b.s3.res$pval, 2)
## [1] 0.4 4.0

Compute standard error for \(\widehat{\beta}\)

H <- matrix(rep(0, (3*6)*(2+3+3-4)), nrow = (3*6), ncol = (2+3+3-4))

H[( 0+1): 6,(0+1):1] <- H1[,-1]
H[( 6+1):12,(1+1):3] <- H2[,-2]
H[(12+1):18,(3+1):4] <- H3[,-c(1,2)]
Sig.e <- b.s3.res$z$DELTA
S11   <- b.s3.res$z$SKK

TT <- nrow(b.s3.res$z$R0)
cov.beta <- H %*% solve( t(H) %*% ( (t(alpha.norm) %*% solve(Sig.e) %*% alpha.norm) %x% S11 ) %*% H ) %*% t(H) / TT

Compare with standard error for \(\widehat{\beta}\) (see \(\mathcal{H}_{S.3}\) in Table 12.3 of Juselius (2006))

matrix(round(c(beta.norm)/sqrt(diag(cov.beta)), 2), nrow = 6, ncol = 3)
##        [,1] [,2]   [,3]
## [1,]    Inf  NaN    NaN
## [2,]   -Inf  3.7    NaN
## [3,]    NaN  Inf   -Inf
## [4,]    NaN  NaN    Inf
## [5,]    NaN  NaN   -Inf
## [6,] -13.67  5.5 -10.71

Compute standard error for \(\widehat{\alpha}\)

cov.alpha <- Sig.e %x% solve(t(beta.norm) %*% S11 %*% beta.norm) / TT

Compare with standard error for \(\widehat{\alpha}\) (see \(\mathcal{H}_{S.3}\) in Table 12.3 of Juselius (2006)

round(alpha.norm/matrix(sqrt(diag(cov.alpha)), nrow = 5, ncol = 3, byrow = TRUE), 2)
##          [,1]  [,2]  [,3]
## Lm3rC.d -4.78  0.54  3.24
## Lyr.d    2.35 -1.64 -2.29
## Dpy.d   -0.11 -5.36 -0.80
## Rm.d    -0.28  1.01 -1.57
## Rb.d     0.69  1.89  2.05

6.2.2 \(\mathcal{H}_{S.4}\) in Table 12.3 of Juselius (2006)

Construct the design matrices \(H_i\) for \(i=1,2,3\).

H1 <- matrix(c( 1, 0, 0,
               -1, 0, 0,
                0, 0, 0,
                0, 1, 0,
                0,-1, 0,
                0, 0, 1), nrow = 6, ncol = 3, byrow = TRUE)

H2 <- matrix(c( 0, 0, 0,
                1, 0, 0,
                0, 1, 0,
                0, 0, 0,
                0, 0, 0,
                0, 0, 1), nrow = 6, ncol = 3, byrow = TRUE)

H3 <- matrix(c( 0, 0, 0,
                0, 0, 0,
                0, 0, 0,
                1, 0, 0,
                0, 1, 0,
                0, 0, 1), nrow = 6, ncol = 3, byrow = TRUE)

Estimate the (over) identified cointegrating and adjustment coefficients.

z <- ca.jo.res.02

b.s4.res <- ca_jo_jus06_hr3_fun(z = z,
                                H1 = H1, H2 = H2, H3 = H3,
                                nor.id1 = 1, nor.id2 = 3, nor.id3 = 4,
                                conv.val = 1e-10, max.iter = 100,
                                df = 3)

Compare results for \(\widehat{\beta}\) (see \(\mathcal{H}_{S.4}\) in Table 12.3 of Juselius (2006))

beta.norm <- b.s4.res$V
round(beta.norm, 2)
##        [,1] [,2]  [,3]
## [1,]   1.00 0.00  0.00
## [2,]  -1.00 0.03  0.00
## [3,]   0.00 1.00  0.00
## [4,] -13.32 0.00  1.00
## [5,]  13.32 0.00 -0.81
## [6,]  -0.15 0.01 -0.01

Compare results for \(\widehat{\alpha}\) (see \(\mathcal{H}_{S.4}\) in Table 12.3 of Juselius (2006))

alpha.norm <- b.s4.res$W
round(alpha.norm, 2)
##          [,1]  [,2]  [,3]
## Lm3rC.d -0.23 -0.54 -0.08
## Lyr.d    0.05 -0.16 -0.31
## Dpy.d   -0.01 -0.79 -0.34
## Rm.d     0.00  0.03 -0.08
## Rb.d     0.00  0.02  0.15

Compare value for LR-test on page 221 of Juselius (2006)

round(Re(b.s4.res$teststat), 2)
## [1] 2.84
round(b.s4.res$pval, 2)
## [1] 0.42 3.00

Compute standard error for \(\widehat{\beta}\)

H <- matrix(rep(0, (3*6)*(3*3-3)), nrow = (3*6), ncol = (3*3-3))

H[( 0+1): 6,(0+1):2] <- H1[,-1]
H[( 6+1):12,(2+1):4] <- H2[,-2]
H[(12+1):18,(4+1):6] <- H3[,-1]
Sig.e <- b.s4.res$z$DELTA
S11   <- b.s4.res$z$SKK

TT <- nrow(b.s4.res$z$R0)
cov.beta <- H %*% solve( t(H) %*% ( (t(alpha.norm) %*% solve(Sig.e) %*% alpha.norm) %x% S11 ) %*% H ) %*% t(H) / TT

Compare with standard error for \(\widehat{\beta}\) (see \(\mathcal{H}_{S.4}\) in Table 12.3 of Juselius (2006))

matrix(round(c(beta.norm)/sqrt(diag(cov.beta)), 2), nrow = 6, ncol = 3)
##       [,1] [,2]   [,3]
## [1,]   Inf  NaN    NaN
## [2,]  -Inf 4.08    NaN
## [3,]   NaN  Inf    NaN
## [4,] -5.73  NaN    Inf
## [5,]  5.73  NaN -10.63
## [6,] -5.16 5.31  -4.80

Compute standard error for \(\widehat{\alpha}\)

cov.alpha <- Sig.e %x% solve(t(beta.norm) %*% S11 %*% beta.norm) / TT

Compare with standard error for \(\widehat{\alpha}\) (see \(\mathcal{H}_{S.4}\) in Table 12.3 of Juselius (2006)

round(alpha.norm/matrix(sqrt(diag(cov.alpha)), nrow = 5, ncol = 3, byrow = TRUE), 2)
##          [,1]  [,2]  [,3]
## Lm3rC.d -4.90 -1.28 -0.10
## Lyr.d    1.92 -0.66 -0.62
## Dpy.d   -0.35 -5.42 -1.20
## Rm.d    -0.73  1.79 -2.32
## Rb.d     0.46  0.94  3.07

References

Johansen, Søren, and Katarina Juselius. 1992. “Testing Structural Hypotheses in a Multivariate Cointegration Analysis of the PPP and the UIP for UK.” Journal of Econometrics 53 (1): 211–44.
Juselius, Katarina. 2006. The Cointegrated VAR Model: Methodology and Applications. Oxford University Press.
Pfaff, Bernhard. 2008. Analysis of Integrated and Cointegrated Time Series with r. Springer Science & Business Media.