## Selected R commands and output of Chapter 5 ## Output is edited to remove unnecessary output. > require(fUnitRoots) > da=read.table("q-ungdp-4812.txt",header=T) > dim(da) [1] 258 4 > head(da) year mon unemp gdp 1 1948 1 3.733333 7.507580 2 1948 4 3.666667 7.525802 3 1948 7 3.766667 7.531177 4 1948 10 3.833333 7.532731 5 1949 1 4.666667 7.518716 6 1949 4 5.866667 7.515072 > gdp=da$gdp ### This step is missing in the text > m1=ar(diff(gdp),method="mle") > m1$order [1] 3 > adfTest(gdp,lags=3) Title: Augmented Dickey-Fuller Test Test Results: PARAMETER: Lag Order: 3 STATISTIC: Dickey-Fuller: 5.5707 P VALUE: 0.99 > adfTest(gdp,lags=3,type="c") Title: Augmented Dickey-Fuller Test Test Results: PARAMETER: Lag Order: 3 STATISTIC: Dickey-Fuller: -2.0176 P VALUE: 0.3056 > adfTest(gdp,lags=3,type="ct") Title: Augmented Dickey-Fuller Test Test Results: PARAMETER: Lag Order: 3 STATISTIC: Dickey-Fuller: -1.625 P VALUE: 0.7338 > library(urca) ### Load urca package > urppTest(gdp) ## Phillips and Perron test Title: Phillips-Perron Unit Root Test Test Results: Test regression with intercept Residuals: Min 1Q Median 3Q Max -0.037338 -0.004463 0.000372 0.005414 0.030725 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 0.031192 0.008801 3.544 0.000468 *** y.l1 0.997289 0.001018 979.834 < 2e-16 *** --- Value of test-statistic, type: Z-alpha is: -0.7218 aux. Z statistics Z-tau-mu 2.7627 ## Plots of the output are not shown here. > ### Multivariate exponential smoothing > da=read.table("d-sp500-0412.txt",header=T) > head(da) mon day year Open High Low Close volume adjClose 1 1 5 2004 1108.48 1122.22 1108.48 1122.22 1578200000 1122.22 2 1 6 2004 1122.22 1124.46 1118.44 1123.67 1494500000 1123.67 3 1 7 2004 1123.67 1126.33 1116.45 1126.33 1704900000 1126.33 4 1 8 2004 1126.33 1131.92 1124.91 1131.92 1868400000 1131.92 5 1 9 2004 1131.92 1131.92 1120.90 1121.86 1720700000 1121.86 6 1 12 2004 1121.86 1127.85 1120.90 1127.23 1510200000 1127.23 > da1=read.table("d-vix-0412.txt",header=T) > head(da1) Mon day year VIXOpen VIXHigh VIXLow VIXClose 1 1 5 2004 18.45 18.49 17.44 17.49 2 1 6 2004 17.66 17.67 16.19 16.73 3 1 7 2004 16.72 16.75 15.50 15.50 4 1 8 2004 15.42 15.68 15.32 15.61 5 1 9 2004 16.15 16.88 15.57 16.75 6 1 12 2004 17.32 17.46 16.79 16.82 > sp5=da$adjClose > vix=da1$VIXClose > zt=cbind(sp5,vix) > dim(zt) [1] 2177 2 > tdx=(4+c(1:2177))/252+2004 > colnames(zt) <- c("S&P 500","VIX") > require(MTS) > MTSplot(zt,tdx) ### See Figure 5.2 of the text > dzt=diffM(zt) > m2=VMA(dzt,1,include.mean=F) Number of parameters: 4 initial estimates: 0.029 -0.9175 0.0066 0.2341 Par. Lower-bounds: -0.0495 -1.5299 -0.0036 0.1546 Par. Upper-bounds: 0.1076 -0.3051 0.0168 0.3136 Final Estimates: 0.03940442 -0.8873514 0.004318878 0.2235565 Coefficient(s): Estimate Std. Error t value Pr(>|t|) [1,] 0.039404 0.037577 1.049 0.29434 [2,] -0.887351 0.295456 -3.003 0.00267 ** [3,] 0.004319 0.004935 0.875 0.38149 [4,] 0.223556 0.040372 5.537 3.07e-08 *** --- Estimates in matrix form: MA coefficient matrix MA( 1 )-matrix [,1] [,2] [1,] 0.03940 -0.887 [2,] 0.00432 0.224 Residuals cov-matrix: [,1] [,2] [1,] 217.04782 -23.426840 [2,] -23.42684 3.671484 ---- aic= 5.517391 bic= 5.527842 > m2a=refVMA(m2,thres=1) Number of parameters: 3 initial estimates: 0.029 -0.9175 0.2341 Par. Lower-bounds: -0.0495 -1.5299 0.1546 Par. Upper-bounds: 0.1076 -0.3051 0.3136 Final Estimates: 0.0663969 -0.7171865 0.1949858 Coefficient(s): Estimate Std. Error t value Pr(>|t|) 0.06640 0.02135 3.110 0.00187 ** -0.71719 0.22240 -3.225 0.00126 ** VIX 0.19499 0.02384 8.177 2.22e-16 *** --- Estimates in matrix form: MA coefficient matrix MA( 1 )-matrix [,1] [,2] [1,] 0.0664 -0.717 [2,] 0.0000 0.195 Residuals cov-matrix: [,1] [,2] [1,] 217.10204 -23.435239 [2,] -23.43524 3.672782 ---- aic= 5.516823 bic= 5.524662 > > MTSdiag(m2a) [1] "Covariance matrix:" S&P 500 VIX S&P 500 217.2 -23.45 VIX -23.4 3.67 CCM at lag: 0 [,1] [,2] [1,] 1.00 -0.83 [2,] -0.83 1.00 Simplified matrix: CCM at lag: 1 . . . . CCM at lag: 2 . + + - CCM at lag: 3 . . . - ### See Figure 5.3 for residual CCM. ### Co-integration test > da=read.table("m-bnd.txt") > head(da) V1 V2 V3 V4 V5 1 1954 7 1 2.89 3.50 2 1954 8 1 2.87 3.49 3 1954 9 1 2.89 3.47 4 1954 10 1 2.87 3.46 5 1954 11 1 2.89 3.45 6 1954 12 1 2.90 3.45 > tail(da) V1 V2 V3 V4 V5 604 2004 10 1 5.47 6.21 605 2004 11 1 5.52 6.20 606 2004 12 1 5.47 6.15 607 2005 1 1 5.36 6.02 608 2005 2 1 5.20 5.82 609 2005 3 1 5.40 6.06 > bnd=da[,4:5] > colnames(bnd) <- c("Aaa","Baa") > m1=VARorder(bnd) selected order: aic = 11 selected order: bic = 3 selected order: hq = 3 Summary table: p AIC BIC HQ M(p) p-value [1,] 0 -0.5697 -0.5697 -0.5697 0.0000 0.0000 [2,] 1 -7.8664 -7.8374 -7.8551 4331.0806 0.0000 [3,] 2 -8.1844 -8.1264 -8.1618 195.5266 0.0000 [4,] 3 -8.2589 -8.1720 -8.2251 51.6109 0.0000 [5,] 4 -8.2552 -8.1393 -8.2101 5.5112 0.2387 [6,] 5 -8.2481 -8.1032 -8.1917 3.5073 0.4768 [7,] 6 -8.2751 -8.1013 -8.2075 23.4161 0.0001 [8,] 7 -8.2803 -8.0775 -8.2014 10.6262 0.0311 [9,] 8 -8.2826 -8.0507 -8.1924 8.9080 0.0634 [10,] 9 -8.2784 -8.0176 -8.1769 5.1613 0.2711 [11,] 10 -8.2775 -7.9877 -8.1648 7.0457 0.1335 [12,] 11 -8.2840 -7.9652 -8.1600 11.2224 0.0242 [13,] 12 -8.2812 -7.9334 -8.1459 5.8956 0.2071 [14,] 13 -8.2716 -7.8949 -8.1251 2.0355 0.7292 > pacf(bnd[,1]) > pacf(bnd[,2]) > adfTest(bnd[,1],lags=3,type="c") Title: Augmented Dickey-Fuller Test Test Results: PARAMETER: Lag Order: 3 STATISTIC: Dickey-Fuller: -1.7007 P VALUE: 0.425 > adfTest(bnd[,2],lags=2,type="c") Title: Augmented Dickey-Fuller Test Test Results: PARAMETER: Lag Order: 2 STATISTIC: Dickey-Fuller: -1.6221 P VALUE: 0.4544 > m2=ca.jo(bnd,K=2,ecdet=c("none")) > summary(m2) ###################### # Johansen-Procedure # ###################### Test type: maximal eigenvalue statistic (lambda max) , with linear trend Eigenvalues (lambda): [1] 0.054773196 0.004665298 Values of teststatistic and critical values of test: test 10pct 5pct 1pct r <= 1 | 2.84 6.50 8.18 11.65 r = 0 | 34.19 12.91 14.90 19.19 Eigenvectors, normalised to first column: (These are the cointegration relations) Aaa.l2 Baa.l2 Aaa.l2 1.0000000 1.000000 Baa.l2 -0.8856789 -2.723912 Weights W: (This is the loading matrix) Aaa.l2 Baa.l2 Aaa.d -0.04696894 0.002477064 Baa.d 0.04046524 0.002139536 > m3=ca.jo(bnd,K=2,ecdet=c("none"),spec=c("transitory")) > summary(m3) ###################### # Johansen-Procedure # ###################### Test type: maximal eigenvalue statistic (lambda max) , with linear trend Eigenvalues (lambda): [1] 0.054773196 0.004665298 Values of teststatistic and critical values of test: test 10pct 5pct 1pct r <= 1 | 2.84 6.50 8.18 11.65 r = 0 | 34.19 12.91 14.90 19.19 Eigenvectors, normalised to first column: (These are the cointegration relations) Aaa.l1 Baa.l1 Aaa.l1 1.0000000 1.000000 Baa.l1 -0.8856789 -2.723912 Weights W: (This is the loading matrix) Aaa.l1 Baa.l1 Aaa.d -0.04696894 0.002477064 Baa.d 0.04046524 0.002139536 > m4=ca.jo(bnd,K=2,ecdet=c("none"),type=c("trace"),spec=c("transitory")) > summary(m4) ###################### # Johansen-Procedure # ###################### Test type: trace statistic , with linear trend Eigenvalues (lambda): [1] 0.054773196 0.004665298 Values of teststatistic and critical values of test: test 10pct 5pct 1pct r <= 1 | 2.84 6.50 8.18 11.65 r = 0 | 37.03 15.66 17.95 23.52 Eigenvectors, normalised to first column: (These are the cointegration relations) Aaa.l1 Baa.l1 Aaa.l1 1.0000000 1.000000 Baa.l1 -0.8856789 -2.723912 Weights W: (This is the loading matrix) Aaa.l1 Baa.l1 Aaa.d -0.04696894 0.002477064 Baa.d 0.04046524 0.002139536 > wt=bnd[,1]-0.886*bnd[,2] > adfTest(wt,lags=3,type="c") Title: Augmented Dickey-Fuller Test Test Results: PARAMETER: Lag Order: 3 STATISTIC: Dickey-Fuller: -4.6054 P VALUE: 0.01 ############### Estimation of ECM model > m1=ECMvar1(bnd,3,wt) ## Given the co-integrated vector alpha: Aaa Baa [1,] -0.000976 0.0636 standard error [,1] [,2] [1,] 0.0347 0.0306 AR coefficient matrix AR( 1 )-matrix Aaa Baa Aaa 0.452 -0.00144 Baa 0.293 0.20386 standard error [,1] [,2] [1,] 0.0879 0.1008 [2,] 0.0774 0.0887 AR( 2 )-matrix Aaa Baa Aaa -0.300 0.0536 Baa -0.151 0.0275 standard error [,1] [,2] [1,] 0.0860 0.0940 [2,] 0.0757 0.0827 ----- Residuals cov-mtx: Aaa Baa Aaa 0.04008513 0.03167097 Baa 0.03167097 0.03105743 det(sse) = 0.0002418906 AIC = -8.294184 BIC = -8.221741 > m2=refECMvar1(m1) ####### Refine the model fit Equation: 1 npar = 2 Equation: 2 npar = 4 alpha: [,1] [,2] [1,] 0 0.0627 standard error [,1] [,2] [1,] 1 0.0304 AR coefficient matrix AR( 1 )-matrix [,1] [,2] [1,] 0.448 0.000 [2,] 0.286 0.212 standard error [,1] [,2] [1,] 0.0393 1.0000 [2,] 0.0746 0.0855 AR( 2 )-matrix [,1] [,2] [1,] -0.256 0 [2,] -0.129 0 standard error [,1] [,2] [1,] 0.0393 1 [2,] 0.0382 1 ----- Residuals cov-mtx: [,1] [,2] [1,] 0.04010853 0.03168199 [2,] 0.03168199 0.03106309 det(sse) = 0.0002421466 AIC = -8.306263 BIC = -8.262797 > beta=c(1,-0.886) ### Initial value of co-integration > m3=ECMvar(bnd,3,beta,include.const=F) #### Joint estimation Order p: 3 Co-integrating rank: 1 Number of parameters: 11 initial estimates: -0.0009756982 0.06361006 -0.886 0.4518931 -0.001440502 -0.300017 0.05355619 0.2929306 0.2038601 -0.1508724 0.02750187 Par. Lower-bounds: -0.05305544 0.01776844 -0.9467831 0.3200362 -0.1526555 -0.4290238 -0.08739684 0.1768675 0.07075767 -0.2644268 -0.09656778 Par. Upper-bounds: 0.05110404 0.1094517 -0.8252169 0.5837499 0.1497745 -0.1710102 0.1945092 0.4089936 0.3369625 -0.03731809 0.1515715 Final Estimates: -0.0007856056 0.06377945 -0.8865275 0.4518208 -0.001407315 -0.3000955 0.05359345 0.2928489 0.203919 -0.1509725 0.02759802 Coefficient(s): Estimate Std. Error t value Pr(>|t|) [1,] -0.0007856 0.0354493 -0.022 0.982319 [2,] 0.0637794 0.0310768 2.052 0.040139 * [3,] -0.8865275 0.0055002 -161.181 < 2e-16 *** [4,] 0.4518208 0.0895744 5.044 4.56e-07 *** [5,] -0.0014073 0.1025758 -0.014 0.989054 [6,] -0.3000955 0.0860253 -3.488 0.000486 *** [7,] 0.0535935 0.0939494 0.570 0.568372 [8,] 0.2928489 0.0785638 3.728 0.000193 *** [9,] 0.2039190 0.0899939 2.266 0.023456 * [10,] -0.1509725 0.0757242 -1.994 0.046183 * [11,] 0.0275980 0.0827168 0.334 0.738648 --- Alpha [,1] [1,] -0.000786 [2,] 0.063779 standard error [,1] [1,] 0.0354 [2,] 0.0311 beta: [,1] [1,] 1.000 [2,] -0.887 standard error [,1] [1,] 1.0000 [2,] 0.0055 AR coefficient matrix AR( 1 )-matrix [,1] [,2] [1,] 0.452 -0.00141 [2,] 0.293 0.20392 standard error [,1] [,2] [1,] 0.0896 0.103 [2,] 0.0786 0.090 AR( 2 )-matrix [,1] [,2] [1,] -0.300 0.0536 [2,] -0.151 0.0276 standard error [,1] [,2] [1,] 0.0860 0.0939 [2,] 0.0757 0.0827 ----- Residuals cov-mtx: Aaa Baa Aaa 0.0399535 0.03156630 Baa 0.0315663 0.03095427 det(sse) = 0.0002403005 AIC = -8.297496 BIC = -8.217807 > #### 4-Macro Example > da=read.table("q-4macro.txt",header=T) > head(da) year mon day rgnp tb3m gs10 m1sk 1 1959 1 1 2725.1 2.773333 3.990000 139.3333 2 1959 4 1 2793.6 3.000000 4.256667 140.5333 3 1959 7 1 2791.5 3.540000 4.503333 141.5333 4 1959 10 1 2802.2 4.230000 4.583333 140.3000 5 1960 1 1 2864.0 3.873333 4.486667 139.9000 6 1960 4 1 2851.1 2.993333 4.260000 139.6000 > tail(da) year mon day rgnp tb3m gs10 m1sk 209 2011 1 1 13394.3 0.12666670 3.460000 1879.367 210 2011 4 1 13486.1 0.04666667 3.210000 1926.767 211 2011 7 1 13534.7 0.02333333 2.426667 2077.800 212 2011 10 1 13672.9 0.01333333 2.046667 2153.800 213 2012 1 1 13693.8 0.06666667 2.036667 2223.000 214 2012 4 1 13768.7 0.08666667 1.823333 2252.500 > zt=cbind(log(da$rgnp),da$tb3m,log(da$m1sk),da$gs10) > colnames(zt) <- c("rgnp","tb3m","lnm1","gs10") > m1=VARorderI(zt) selected order: aic = 6 selected order: bic = 2 selected order: hq = 2 M statistic and its p-value Mstat pv [1,] 3526.49 0.000e+00 [2,] 150.07 0.000e+00 [3,] 47.98 4.776e-05 [4,] 32.28 9.206e-03 [5,] 19.24 2.564e-01 [6,] 55.17 3.335e-06 [7,] 22.17 1.379e-01 [8,] 27.65 3.479e-02 [9,] 22.97 1.147e-01 [10,] 27.71 3.423e-02 [11,] 15.20 5.097e-01 [12,] 18.21 3.118e-01 [13,] 29.04 2.368e-02 Summary table: p AIC BIC HQ M(p) p-value [1,] 0 -3.2537 -3.2537 -3.2537 0.000 0.0000e+00 [2,] 1 -21.1418 -20.8893 -21.0398 3526.493 0.0000e+00 [3,] 2 -21.7738 -21.2671 -21.5690 150.067 0.0000e+00 [4,] 3 -21.8766 -21.1141 -21.5684 47.985 4.7760e-05 [5,] 4 -21.8980 -20.8779 -21.4856 32.275 9.2056e-03 [6,] 5 -21.8491 -20.5698 -21.3319 19.240 2.5641e-01 [7,] 6 -22.0060 -20.4656 -21.3831 55.169 3.3352e-06 [8,] 7 -21.9762 -20.1730 -21.2470 22.167 1.3788e-01 [9,] 8 -21.9807 -19.912> m2=ca.jo(zt,K=5,ecdet=c("none"),spec=c("transitory")) > summary(m2) ###################### # Johansen-Procedure # ###################### Test type: maximal eigenvalue statistic (lambda max) , with linear trend Eigenvalues (lambda): [1] 0.16143084 0.05123820 0.03637617 0.01324657 Values of teststatistic and critical values of test: test 10pct 5pct 1pct r <= 3 | 2.79 6.50 8.18 11.65 r <= 2 | 7.74 12.91 14.90 19.19 r <= 1 | 10.99 18.90 21.07 25.75 r = 0 | 36.80 24.78 27.14 32.14 Eigenvectors, normalised to first column: (These are the cointegration relations) rgnp.l1 tb3m.l1 lnm1.l1 gs10.l1 rgnp.l1 1.0000000 1.00000000 1.000000000 1.00000000 tb3m.l1 -0.3748031 -0.01185910 -0.008323757 -0.02759626 lnm1.l1 -0.7625720 -0.65535990 -0.444779385 -0.59712786 gs10.l1 0.3975232 0.03405986 0.027687430 -0.02810554 Weights W: (This is the loading matrix) rgnp.l1 tb3m.l1 lnm1.l1 gs10.l1 rgnp.d 0.005322782 0.001446915 -0.01092972 1.205108e-05 tb3m.d 0.210791020 -0.241974802 -0.15253600 4.018748e-01 lnm1.d 0.005401757 0.014661452 0.00530876 8.842242e-04 gs10.d -0.369050278 0.181937747 -0.30633725 2.151025e-01 9 -21.1444 27.651 3.4789e-02 [10,] 9 -21.9590 -19.6247 -21.0148 22.965 1.1467e-01 [11,] 10 -21.9689 -19.3665 -20.9162 27.711 3.4229e-02 [12,] 11 -21.9014 -19.0288 -20.7392 15.205 5.0971e-01 [13,] 12 -21.8545 -18.7101 -20.5823 18.209 3.1182e-01 [14,] 13 -21.8828 -18.4644 -20.4995 29.039 2.3677e-02 > require(fUnitRoots) > require(urca) > m2=ca.jo(zt,K=5,ecdet=c("const"),spec=c("transitory")) > summary(m2) ###################### # Johansen-Procedure # ###################### Test type: maximal eigenvalue statistic (lambda max) , without linear trend and constant in cointegration Eigenvalues (lambda): [1] 1.922074e-01 1.356749e-01 4.000707e-02 2.014771e-02 -1.033542e-16 Values of teststatistic and critical values of test: test 10pct 5pct 1pct r <= 3 | 4.25 7.52 9.24 12.97 r <= 2 | 8.53 13.75 15.67 20.20 r <= 1 | 30.47 19.77 22.00 26.81 r = 0 | 44.61 25.56 28.14 33.24 Eigenvectors, normalised to first column: (These are the cointegration relations) rgnp.l1 tb3m.l1 lnm1.l1 gs10.l1 constant rgnp.l1 1.0000000 1.0000000 1.00000000 1.000000000 1.0000000 tb3m.l1 -0.2819887 -0.7797076 -0.01416840 -0.045476665 0.0396296 lnm1.l1 -0.7919986 -0.6729377 -0.53816014 -0.761616376 -0.1692782 gs10.l1 0.3133461 0.7725252 0.03191589 0.005341667 -0.1914556 constant -3.7262634 -5.9350635 -5.60843447 -3.891464213 -6.4644984 Weights W: (This is the loading matrix) rgnp.l1 tb3m.l1 lnm1.l1 gs10.l1 constant rgnp.d 0.008002569 -0.0002847031 -0.01362198 0.001756145 4.375846e-16 tb3m.d -0.210592115 0.1658140836 -0.13085572 0.393788772 -3.865075e-14 lnm1.d 0.008645836 -0.0006180018 0.01654754 0.001680815 -4.072097e-15 gs10.d -0.273660749 -0.0836309344 -0.19194137 0.270885736 2.500791e-14 > m3=ca.jo(zt,K=5,ecdet=c("const"),spec=c("transitory"),type=c("trace")) > summary(m3) ###################### # Johansen-Procedure # ###################### Test type: trace statistic , without linear trend and constant in cointegration Eigenvalues (lambda): [1] 1.922074e-01 1.356749e-01 4.000707e-02 2.014771e-02 -1.033542e-16 Values of teststatistic and critical values of test: test 10pct 5pct 1pct r <= 3 | 4.25 7.52 9.24 12.97 r <= 2 | 12.79 17.85 19.96 24.60 r <= 1 | 43.26 32.00 34.91 41.07 r = 0 | 87.87 49.65 53.12 60.16 Eigenvectors, normalised to first column: (These are the cointegration relations) rgnp.l1 tb3m.l1 lnm1.l1 gs10.l1 constant rgnp.l1 1.0000000 1.0000000 1.00000000 1.000000000 1.0000000 tb3m.l1 -0.2819887 -0.7797076 -0.01416840 -0.045476665 0.0396296 lnm1.l1 -0.7919986 -0.6729377 -0.53816014 -0.761616376 -0.1692782 gs10.l1 0.3133461 0.7725252 0.03191589 0.005341667 -0.1914556 constant -3.7262634 -5.9350635 -5.60843447 -3.891464213 -6.4644984 Weights W: (This is the loading matrix) rgnp.l1 tb3m.l1 lnm1.l1 gs10.l1 constant rgnp.d 0.008002569 -0.0002847031 -0.01362198 0.001756145 4.375846e-16 tb3m.d -0.210592115 0.1658140836 -0.13085572 0.393788772 -3.865075e-14 lnm1.d 0.008645836 -0.0006180018 0.01654754 0.001680815 -4.072097e-15 gs10.d -0.273660749 -0.0836309344 -0.19194137 0.270885736 2.500791e-14 > w1t=zt[,1]-0.282*zt[,2]-0.792*zt[,3]+0.313*zt[,4] > w2t=zt[,1]-0.78*zt[,2]-0.673*zt[,3]+0.773*zt[,4] > adfTest(w1t,lags=6,type="c") Title: Augmented Dickey-Fuller Test Test Results: PARAMETER: Lag Order: 6 STATISTIC: Dickey-Fuller: -3.8739 P VALUE: 0.01 > adfTest(w2t,lags=6,type="c") Title: Augmented Dickey-Fuller Test Test Results: PARAMETER: Lag Order: 6 STATISTIC: Dickey-Fuller: -4.3688 P VALUE: 0.01 > wt=cbind(w1t,w2t) > m3=ECMvar1(zt,6,wt,include.const=T) alpha: w1t w2t rgnp 0.00974 -0.000622 tb3m 0.11632 0.139180 lnm1 0.00809 -0.000992 gs10 0.05296 -0.161531 standard error [,1] [,2] [1,] 0.00348 0.00113 [2,] 0.28304 0.09213 [3,] 0.00397 0.00129 [4,] 0.19919 0.06484 constant term: rgnp tb3m lnm1 gs10 -0.0325 -1.5371 -0.0263 0.5819 standard error [1] 0.0120 0.9763 0.0137 0.6870 AR coefficient matrix AR( 1 )-matrix rgnp tb3m lnm1 gs10 rgnp 0.193 0.00422 -0.0914 -0.00233 tb3m 14.982 0.45321 0.4497 -0.08414 lnm1 -0.069 -0.00208 0.4453 -0.00471 gs10 7.415 0.06947 0.9398 0.13990 standard error [,1] [,2] [,3] [,4] [1,] 0.0711 0.00120 0.0600 0.00153 [2,] 5.7750 0.09744 4.8721 0.12405 [3,] 0.0809 0.00137 0.0683 0.00174 [4,] 4.0641 0.06857 3.4286 0.08730 AR( 2 )-matrix rgnp tb3m lnm1 gs10 rgnp 0.161 -1.43e-03 0.0893 -0.002829 tb3m 10.697 -3.28e-01 5.5161 -0.173910 lnm1 -0.084 6.36e-05 0.2065 0.000356 gs10 0.528 -1.55e-01 6.1943 -0.043986 standard error [,1] [,2] [,3] [,4] [1,] 0.0719 0.00124 0.0646 0.00154 [2,] 5.8368 0.10069 5.2466 0.12535 [3,] 0.0818 0.00141 0.0735 0.00176 [4,] 4.1076 0.07086 3.6922 0.08822 AR( 3 )-matrix rgnp tb3m lnm1 gs10 rgnp -0.1155 0.002579 -0.0996 -0.001288 tb3m -8.3260 0.430954 10.8227 0.186354 lnm1 -0.0145 0.000509 -0.0316 -0.000907 gs10 -5.0442 0.125956 3.7692 0.130665 standard error [,1] [,2] [,3] [,4] [1,] 0.0728 0.00120 0.0665 0.00154 [2,] 5.9137 0.09763 5.4038 0.12529 [3,] 0.0829 0.00137 0.0757 0.00176 [4,] 4.1617 0.06870 3.8029 0.08817 AR( 4 )-matrix rgnp tb3m lnm1 gs10 rgnp 0.0591 -2.58e-04 -0.0257 -0.00208 tb3m -3.5021 -4.15e-02 -19.1561 -0.01933 lnm1 0.0454 -9.14e-05 -0.0215 -0.00364 gs10 0.9602 4.32e-03 -10.6963 -0.08564 standard error [,1] [,2] [,3] [,4] [1,] 0.0693 0.00113 0.0741 0.00153 [2,] 5.6300 0.09213 6.0189 0.12418 [3,] 0.0789 0.00129 0.0844 0.00174 [4,] 3.9621 0.06484 4.2357 0.08739 AR( 5 )-matrix rgnp tb3m lnm1 gs10 rgnp -0.0693 -7.74e-06 -0.0105 -0.00221 tb3m 6.9776 3.49e-01 6.1031 -0.30925 lnm1 0.0901 7.11e-05 0.0987 0.00281 gs10 -4.0396 1.29e-01 7.3253 -0.30182 standard error [,1] [,2] [,3] [,4] [1,] 0.0672 0.00108 0.0665 0.00155 [2,] 5.4602 0.08787 5.4045 0.12577 [3,] 0.0765 0.00123 0.0757 0.00176 [4,] 3.8426 0.06184 3.8033 0.08851 ----- Residuals cov-mtx: rgnp tb3m lnm1 gs10 rgnp 5.349817e-05 0.0010139262 -7.142742e-06 0.0006583782 tb3m 1.013926e-03 0.3529833289 -1.493661e-04 0.1646324845 lnm1 -7.142742e-06 -0.0001493661 6.933185e-05 -0.0001368415 gs10 6.583782e-04 0.1646324845 -1.368415e-04 0.1748132824 det(sse) = 1.188243e-10 AIC = -21.99356 BIC = -20.54651 > MTSdiag(m3) ### Model checking [1] "Covariance matrix:" rgnp tb3m lnm1 gs10 rgnp 5.38e-05 0.00102 -7.18e-06 0.000662 tb3m 1.02e-03 0.35468 -1.50e-04 0.165424 lnm1 -7.18e-06 -0.00015 6.97e-05 -0.000137 gs10 6.62e-04 0.16542 -1.37e-04 0.175654 CCM at lag: 0 [,1] [,2] [,3] [,4] [1,] 1.000 0.2333 -0.1173 0.2153 [2,] 0.233 1.0000 -0.0302 0.6628 [3,] -0.117 -0.0302 1.0000 -0.0393 [4,] 0.215 0.6628 -0.0393 1.0000 Simplified matrix: CCM at lag: 1 . . . . . . . . . . . . . . . . CCM at lag: 2 . . . . . . . . . . . . . . . . CCM at lag: 3 . . . . . . . . . . . . . . . . CCM at lag: 4 . . . . . . . . . . . . . . . . CCM at lag: 5 . . . . . - . . . . . . . . . . CCM at lag: 6 . . . . . . . . . . . . . . . . CCM at lag: 7 . . . . . - . - . . . . . . . - CCM at lag: 8 . . . . - . . . . . . . - - . . CCM at lag: 9 . . . . . . . . . . . . . . . . CCM at lag: 10 . . . . + . . . . . . . + . . . CCM at lag: 11 . . . . . . . . . . + . . . . . CCM at lag: 12 . . . . . . . . . . . . . . . . CCM at lag: 13 . . . . . . . . . . . . . - . . CCM at lag: 14 . . . . . . . . . . . . . . . . CCM at lag: 15 . . . . . . . . . . . . . . . . CCM at lag: 16 . . . . . . . . . . . . . . . . CCM at lag: 17 . . . . . . . . . . . . . . . . CCM at lag: 18 . . . . . . . . . . . . . . . . CCM at lag: 19 . . . . . . . . . . . . . . . . CCM at lag: 20 . . . . . . . . . . . . . . . . CCM at lag: 21 . . . . . . . . . . . . . . . . CCM at lag: 22 . . . . . . . . . . . . . . . . CCM at lag: 23 . . . . . . . . . . . . . . . . CCM at lag: 24 . . . . . . . . . . . . + . . . Hit Enter for p-value plot of individual ccm: ### Plot not shown Hit Enter to compute MQ-statistics: ### Plot not shown Ljung-Box Statistics: m Q(m) df p-value [1,] 1.00 2.09 16.00 1.00 [2,] 2.00 7.23 32.00 1.00 [3,] 3.00 9.11 48.00 1.00 [4,] 4.00 15.00 64.00 1.00 [5,] 5.00 25.16 80.00 1.00 [6,] 6.00 35.23 96.00 1.00 [7,] 7.00 52.67 112.00 1.00 [8,] 8.00 80.87 128.00 1.00 [9,] 9.00 97.36 144.00 1.00 [10,] 10.00 119.12 160.00 0.99 [11,] 11.00 141.98 176.00 0.97 [12,] 12.00 154.72 192.00 0.98 [13,] 13.00 171.58 208.00 0.97 [14,] 14.00 183.18 224.00 0.98 [15,] 15.00 204.90 240.00 0.95 [16,] 16.00 215.62 256.00 0.97 [17,] 17.00 241.67 272.00 0.91 [18,] 18.00 257.49 288.00 0.90 [19,] 19.00 268.08 304.00 0.93 [20,] 20.00 277.31 320.00 0.96 [21,] 21.00 288.65 336.00 0.97 [22,] 22.00 298.95 352.00 0.98 [23,] 23.00 306.68 368.00 0.99 [24,] 24.00 318.97 384.00 0.99 Hit Enter to obtain residual plots: ## plot not shown Hit return for more plots: ## plot not shown > m4=refECMvar1(m3,thres=0.8) Equation: 1 npar = 18 Equation: 2 npar = 17 Equation: 3 npar = 12 Equation: 4 npar = 17 alpha: [,1] [,2] [1,] 0.00836 0.000 [2,] 0.00000 0.172 [3,] 0.00528 0.000 [4,] 0.00000 -0.150 standard error [,1] [,2] [1,] 0.00233 1.0000 [2,] 1.00000 0.0702 [3,] 0.00224 1.0000 [4,] 1.00000 0.0483 constant term: [1] -0.0301 -1.2372 -0.0196 0.7577 standard error [1] 0.00976 0.36863 0.00954 0.25755 AR coefficient matrix AR( 1 )-matrix [,1] [,2] [,3] [,4] [1,] 0.196 0.00415 -0.0893 -0.00219 [2,] 14.986 0.39745 0.0000 0.00000 [3,] -0.062 -0.00227 0.4339 -0.00445 [4,] 7.860 0.06760 0.0000 0.13433 standard error [,1] [,2] [,3] [,4] [1,] 0.0696 0.00112 0.0598 0.00145 [2,] 5.5469 0.07110 1.0000 1.00000 [3,] 0.0757 0.00117 0.0631 0.00159 [4,] 3.8226 0.06224 1.0000 0.08164 AR( 2 )-matrix [,1] [,2] [,3] [,4] [1,] 0.1618 -0.00132 0.0806 -0.00285 [2,] 11.4784 -0.31896 5.9157 -0.17477 [3,] -0.0613 0.00000 0.1972 0.00000 [4,] 0.0000 -0.17806 6.8124 0.00000 standard error [,1] [,2] [,3] [,4] [1,] 0.0708 0.00109 0.0632 0.00149 [2,] 5.5507 0.08366 4.8020 0.11529 [3,] 0.0733 1.00000 0.0651 1.00000 [4,] 1.0000 0.04830 3.3461 1.00000 AR( 3 )-matrix [,1] [,2] [,3] [,4] [1,] -0.117 0.00253 -0.117 -0.00129 [2,] -8.551 0.39215 12.188 0.20294 [3,] 0.000 0.00000 0.000 0.00000 [4,] -4.593 0.12655 3.954 0.12920 standard error [,1] [,2] [,3] [,4] [1,] 0.0709 0.00109 0.0594 0.00151 [2,] 5.7180 0.09125 4.9811 0.12027 [3,] 1.0000 1.00000 1.0000 1.00000 [4,] 3.9978 0.06433 3.6682 0.08402 AR( 4 )-matrix [,1] [,2] [,3] [,4] [1,] 0.058 0 0.0 -0.00238 [2,] 0.000 0 -19.0 0.00000 [3,] 0.000 0 0.0 -0.00326 [4,] 0.000 0 -10.6 -0.07955 standard error [,1] [,2] [,3] [,4] [1,] 0.0656 1 1.00 0.00128 [2,] 1.0000 1 5.96 1.00000 [3,] 1.0000 1 1.00 0.00133 [4,] 1.0000 1 4.15 0.07382 AR( 5 )-matrix [,1] [,2] [,3] [,4] [1,] -0.0664 0.000 0.000 -0.00201 [2,] 6.7894 0.318 5.019 -0.28887 [3,] 0.1131 0.000 0.075 0.00322 [4,] -3.6087 0.128 7.358 -0.30118 standard error [,1] [,2] [,3] [,4] [1,] 0.0642 1.0000 1.0000 0.00123 [2,] 5.3672 0.0838 5.1080 0.11650 [3,] 0.0678 1.0000 0.0553 0.00130 [4,] 3.7635 0.0593 3.6650 0.08368 ----- Residuals cov-mtx: [,1] [,2] [,3] [,4] [1,] 5.369361e-05 0.0010198162 -7.005740e-06 0.0006598295 [2,] 1.019816e-03 0.3559545871 -1.477354e-04 0.1644674108 [3,] -7.005740e-06 -0.0001477354 6.992031e-05 -0.0001313209 [4,] 6.598295e-04 0.1644674108 -1.313209e-04 0.1753279352 det(sse) = 1.229817e-10 AIC = -22.22086 BIC = -21.21421