Baixe o app para aproveitar ainda mais
Prévia do material em texto
6º EXERCÍCIO ECONOMETRIA DE SÉRIES TEMPORAIS PROFESSOR: RICARDO CHAVES LIMA ALUNA: AMANDA STEFFANY DA SILVA RAUJO RECIFE 2017 Exercício 6 Usando o banco de dados Canada, estime o modelo VAR com decomposição triangular (Choleski) mostrando e discutindo: i) os parâmetros do modelo; ii) a função de impulso-resposta; iii) a decomposição da variância. Note: - usar como exemplo da estimação do VAR os arquivos var.r (programa) e gujarativardados.r (banco de dados). gujarativardados # M1=money supply,R=interest rate, P=price index, GDP=product summary(gujarativardados) #det lag langht VARselect(gujarativar, lag.max = 8, type = "both") #det endogeneidade gujvar <- VAR(gujarativar, p = 3, type = "const") causality(gujvar, cause = "M1") causality(gujvar, cause = "R") #ADF adf11 <- summary(ur.df(gujarativar[, "M1"], type = "trend", lags = 3));adf11 adf12 <- summary(ur.df(gujarativar[, "R"], type = "trend", lags = 3));adf12 adf21 <- summary(ur.df(diff(gujarativar[, "M1"]), type = "drift", lags = 3));adf21 adf22 <- summary(ur.df(diff(gujarativar[, "R"]), type = "drift", lags = 3));adf22 # run VAR gvar <- VAR(gujarativar, p = 2, type="both") summary(gvar) # residuals test - The H0 a joint hypothesis of the skewness being zero and the excess kurtosis being zero (normality) ser11 <- serial.test(gvar, lags.pt = 15, type = "PT.asymptotic"); ser11$serial ser11 <- serial.test(gvar, lags.pt = 14, type = "PT.asymptotic"); ser11$serial ser11 <- serial.test(gvar, lags.pt = 13, type = "PT.asymptotic"); ser11$serial ser11 <- serial.test(gvar, lags.pt = 12, type = "PT.asymptotic"); ser11$serial ser11 <- serial.test(gvar, lags.pt = 11, type = "PT.asymptotic"); ser11$serial ser11 <- serial.test(gvar, lags.pt = 10, type = "PT.asymptotic"); ser11$serial ser11 <- serial.test(gvar, lags.pt = 9, type = "PT.asymptotic"); ser11$serial ser11 <- serial.test(gvar, lags.pt = 8, type = "PT.asymptotic"); ser11$serial ser11 <- serial.test(gvar, lags.pt = 7, type = "PT.asymptotic"); ser11$serial ser11 <- serial.test(gvar, lags.pt = 6, type = "PT.asymptotic"); ser11$serial ser11 <- serial.test(gvar, lags.pt = 5, type = "PT.asymptotic"); ser11$serial ser11 <- serial.test(gvar, lags.pt = 4, type = "PT.asymptotic"); ser11$serial ser11 <- serial.test(gvar, lags.pt = 3, type = "PT.asymptotic"); ser11$serial ser11 <- serial.test(gvar, lags.pt = 2, type = "PT.asymptotic"); ser11$serial norm1 <- normality.test(gvar);norm1$jb.mul arch1 <- arch.test(gvar, lags.multi = 5);arch1$arch.mul # residuals checking plot(arch1, names = "M1") plot(arch1, names = "R") plot(stability(gvar), nc = 2); # H0 = STABILITY # VARIANCE DECOMPOSITION fevd(gvar, n.ahead = 15) # IMPULSE RESPONSE FUNCTION # FOR R -> M1 IRFM1 = irf(gvar, impulse = "R", response = c("M1"), boot = TRUE, n.ahead=15,ci=0.95); IRFM1;plot(IRFM1) # FOR R -> R IRFR = irf(gvar, impulse = "R", response = c("R"), boot = TRUE, n.ahead=15,ci=0.95); IRFR;plot(IRFR) ##### # FOR M1 -> R IRFM1 = irf(gvar, impulse = "M1", response = c("R"), boot = TRUE, n.ahead=15,ci=0.95); IRFM1; plot(IRFM1) # FOR M1 -> M1 IRFR = irf(gvar, impulse = "M1", response = c("M1"), boot = TRUE, n.ahead=15,ci=0.95); IRFR; plot(IRFR) CONSOLE: > gujarativardados M1 R P GDP 1 22175.00 11.13333 0.77947 33480 2 22841.00 11.16667 0.80861 33670 3 23461.00 11.80000 0.82649 340096 4 23427.00 14.18333 0.84863 341844 5 23811.00 14.38333 0.86693 342776 6 23612.33 12.98330 0.88950 342264 7 24543.00 10.71667 0.91553 340716 8 25638.66 14.53333 0.93743 347780 9 25316.00 17.13333 0.96523 354836 10 25501.33 18.56667 0.98774 359352 11 25382.33 21.01666 1.01314 356152 12 24753.00 16.61665 1.03410 353636 13 25094.33 15.35000 1.05743 349568 14 25253.66 16.04999 1.07748 345284 15 24936.66 14.31667 1.09666 343028 16 25553.00 10.88333 1.11641 340292 17 26755.33 9.61667 1.12303 346072 18 27412.00 9.31667 1.13395 353860 19 28403.33 9.33333 1.14721 359544 20 28402.33 9.55000 1.16059 362304 21 28715.66 10.08333 1.17117 368280 22 28996.33 11.45000 1.17406 376768 23 28479.33 12.45000 1.17795 381016 24 28669.00 10.76667 1.18438 385396 25 29018.66 10.51667 1.18990 39024 26 29398.66 9.66667 1.20625 391580 27 30203.66 9.03333 1.21492 396384 28 31059.33 9.01667 1.21805 405308 29 30745.33 11.03333 1.22408 405680 30 30477.66 8.73333 1.22856 408116 31 31563.66 8.46667 1.23916 409160 32 32800.66 8.40000 1.25368 409616 33 33958.33 7.25000 1.27117 416484 34 35795.66 8.30000 1.28429 422916 35 35878.66 9.30000 1.29599 429980 36 36336.00 8.70000 1.31001 436264 37 36480.33 8.61667 1.32325 440592 38 37108.66 9.13333 1.33219 446680 39 38423.00 10.05000 1.35065 450328 40 38480.66 10.83333 1.36648 453516 > # M1=money supply,R=interest rate, P=price index, GDP=product > summary(gujarativardados) M1 R P GDP Min. :22175 Min. : 7.250 Min. :0.7795 Min. : 33480 1st Qu.:25214 1st Qu.: 9.258 1st Qu.:1.0068 1st Qu.:344720 Median :28441 Median :10.742 Median :1.1659 Median :360924 Mean :28872 Mean :11.511 Mean :1.1200 Mean :355491 3rd Qu.:31185 3rd Qu.:13.283 3rd Qu.:1.2312 3rd Qu.:408377 Max. :38481 Max. :21.017 Max. :1.3665 Max. :453516 > #det lag langht > VARselect(gujarativar, lag.max = 8, type = "both") $selection AIC(n) HQ(n) SC(n) FPE(n) 3 1 1 3 $criteria 1 2 3 4 5 6 AIC(n) 13.07743 13.07728 13.03905 13.26329 13.24437 13.23197 HQ(n) 13.19889 13.25947 13.28197 13.56695 13.60875 13.65709 SC(n) 13.44387 13.62693 13.77191 14.17938 14.34367 14.51449 FPE(n) 479289.52041 482269.79230 470098.15445 601118.97639 610041.24906 633180.18217 7 8 AIC(n) 13.36761 1.355938e+01 HQ(n) 13.85346 1.410597e+01 SC(n) 14.83334 1.520834e+01 FPE(n) 778271.23513 1.040608e+06 > #det endogeneidade > gujvar <- VAR(gujarativar, p = 3, type = "const") > causality(gujvar, cause = "M1") $Granger Granger causality H0: M1 do not Granger-cause R data: VAR object gujvar F-Test = 2.7255, df1 = 3, df2 = 60, p-value = 0.05198 $Instant H0: No instantaneous causality between: M1 and R data: VAR object gujvar Chi-squared = 0.00064102, df = 1, p-value = 0.9798 #p-value > 0,05 H0 > causality(gujvar, cause = "R") $Granger Granger causality H0: R do not Granger-cause M1 data: VAR object gujvar F-Test = 7.7294, df1 = 3, df2 = 60, p-value = 0.00019 $Instant H0: No instantaneous causality between: R and M1 data: VAR object gujvar Chi-squared = 0.00064102, df = 1, p-value = 0.9798 #p-value > 0,05 H0 > #ADF > adf11 <- summary(ur.df(gujarativar[, "M1"], type = "trend", lags = 3));adf11 ############################################### # Augmented Dickey-Fuller Test Unit Root Test # ############################################### Test regression trend Call: lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag) Residuals: Min 1Q Median 3Q Max -972.09 -380.19 41.78 404.35 1129.78 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 2895.57313 2015.94654 1.436 0.1613 z.lag.1 -0.13651 0.09793 -1.394 0.1736 tt 63.68569 37.25477 1.709 0.0977 . z.diff.lag1 0.25318 0.19377 1.307 0.2013 z.diff.lag2 -0.04265 0.19320 -0.221 0.8268 z.diff.lag3 0.09738 0.19487 0.500 0.6209 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 582.2 on 30 degrees of freedom Multiple R-squared: 0.1579, Adjusted R-squared: 0.0175 F-statistic: 1.125 on 5 and 30 DF, p-value: 0.3686 Value of test-statisticis: -1.394 3.0754 1.8664 Critical values for test statistics: 1pct 5pct 10pct tau3 -4.15 -3.50 -3.18 phi2 7.02 5.13 4.31 phi3 9.31 6.73 5.61 > adf12 <- summary(ur.df(gujarativar[, "R"], type = "trend", lags = 3));adf12 ############################################### # Augmented Dickey-Fuller Test Unit Root Test # ############################################### Test regression trend Call: lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag) Residuals: Min 1Q Median 3Q Max -2.9402 -0.7891 -0.1569 0.9050 3.2822 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 5.40625 2.44767 2.209 0.0350 * z.lag.1 -0.34894 0.14553 -2.398 0.0229 * tt -0.06723 0.04079 -1.648 0.1097 z.diff.lag1 0.32597 0.17622 1.850 0.0742 . z.diff.lag2 -0.03025 0.17465 -0.173 0.8636 z.diff.lag3 0.17375 0.17369 1.000 0.3251 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 1.595 on 30 degrees of freedom Multiple R-squared: 0.2076, Adjusted R-squared: 0.07549 F-statistic: 1.572 on 5 and 30 DF, p-value: 0.1982 Value of test-statistic is: -2.3978 1.9935 2.9285 Critical values for test statistics: 1pct 5pct 10pct tau3 -4.15 -3.50 -3.18 phi2 7.02 5.13 4.31 phi3 9.31 6.73 5.61 > adf21 <- summary(ur.df(diff(gujarativar[, "M1"]), type = "drift", lags = 3));adf21 ############################################### # Augmented Dickey-Fuller Test Unit Root Test # ############################################### Test regression drift Call: lm(formula = z.diff ~ z.lag.1 + 1 + z.diff.lag) Residuals: Min 1Q Median 3Q Max -813.5 -488.3 -106.6 383.5 985.7 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 448.6445 153.5195 2.922 0.006545 ** z.lag.1 -1.0866 0.2926 -3.713 0.000835 *** z.diff.lag1 0.3368 0.2637 1.277 0.211247 z.diff.lag2 0.2276 0.2204 1.032 0.310164 z.diff.lag3 0.3661 0.1773 2.065 0.047699 * --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 577.5 on 30 degrees of freedom Multiple R-squared: 0.4681, Adjusted R-squared: 0.3972 F-statistic: 6.601 on 4 and 30 DF, p-value: 0.0006186 Value of test-statistic is: -3.713 6.8978 Critical values for test statistics: 1pct 5pct 10pct tau2 -3.58 -2.93 -2.60 phi1 7.06 4.86 3.94 > adf22 <- summary(ur.df(diff(gujarativar[, "R"]), type = "drift", lags = 3));adf22 ############################################### # Augmented Dickey-Fuller Test Unit Root Test # ############################################### Test regression drift Call: lm(formula = z.diff ~ z.lag.1 + 1 + z.diff.lag) Residuals: Min 1Q Median 3Q Max -3.9015 -0.7288 0.0862 0.8582 4.3815 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -0.1058 0.2919 -0.362 0.71958 z.lag.1 -1.1609 0.3421 -3.393 0.00196 ** z.diff.lag1 0.3272 0.2899 1.129 0.26799 z.diff.lag2 0.1090 0.2290 0.476 0.63747 z.diff.lag3 0.1676 0.1758 0.953 0.34802 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 1.718 on 30 degrees of freedom Multiple R-squared: 0.4687, Adjusted R-squared: 0.3979 F-statistic: 6.618 on 4 and 30 DF, p-value: 0.0006085 Value of test-statistic is: -3.3935 5.7581 Critical values for test statistics: 1pct 5pct 10pct tau2 -3.58 -2.93 -2.60 phi1 7.06 4.86 3.94 > # run VAR > gvar <- VAR(gujarativar, p = 2, type="both") > summary(gvar) VAR Estimation Results: ========================= Endogenous variables: R, M1 Deterministic variables: both Sample size: 38 Log Likelihood: -346.072 Roots of the characteristic polynomial: 0.8383 0.8383 0.3928 0.3928 Call: VAR(y = gujarativar, p = 2, type = "both") Estimation results for equation R: ================================== R = R.l1 + M1.l1 + R.l2 + M1.l2 + const + trend Estimate Std. Error t value Pr(>|t|) R.l1 0.8558345 0.1696657 5.044 1.75e-05 *** M1.l1 0.0011539 0.0004897 2.356 0.0248 * R.l2 -0.0567715 0.1662271 -0.342 0.7349 M1.l2 -0.0006730 0.0005201 -1.294 0.2050 const -6.7291429 4.9760262 -1.352 0.1858 trend -0.2370593 0.0913681 -2.595 0.0142 * --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 1.402 on 32 degrees of freedom Multiple R-Squared: 0.839, Adjusted R-squared: 0.8139 F-statistic: 33.36 on 5 and 32 DF, p-value: 8.545e-12 Estimation results for equation M1: =================================== M1 = R.l1 + M1.l1 + R.l2 + M1.l2 + const + trend Estimate Std. Error t value Pr(>|t|) R.l1 -2.436e+02 5.421e+01 -4.494 8.58e-05 *** M1.l1 1.020e+00 1.565e-01 6.519 2.43e-07 *** R.l2 1.615e+02 5.311e+01 3.041 0.00467 ** M1.l2 4.328e-03 1.662e-01 0.026 0.97939 const 9.314e+02 1.590e+03 0.586 0.56209 trend -1.293e+01 2.919e+01 -0.443 0.66083 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 447.9 on 32 degrees of freedom Multiple R-Squared: 0.9917, Adjusted R-squared: 0.9904 F-statistic: 766.1 on 5 and 32 DF, p-value: < 2.2e-16 Covariance matrix of residuals: R M1 R 1.966 -33.68 M1 -33.676 200649.25 Correlation matrix of residuals: R M1 R 1.00000 -0.05362 M1 -0.05362 1.00000 > # residuals test - The H0 a joint hypothesis of the skewness being zero and the excess kurtosis being zero (normality) > ser11 <- serial.test(gvar, lags.pt = 15, type = "PT.asymptotic"); ser11$serial Portmanteau Test (asymptotic) data: Residuals of VAR object gvar Chi-squared = 31.426, df = 52, p-value = 0.9893 > ser11 <- serial.test(gvar, lags.pt = 14, type = "PT.asymptotic"); ser11$serial Portmanteau Test (asymptotic) data: Residuals of VAR object gvar Chi-squared = 28.506, df = 48, p-value = 0.9886 > ser11 <- serial.test(gvar, lags.pt = 13, type = "PT.asymptotic"); ser11$serial Portmanteau Test (asymptotic) data: Residuals of VAR object gvar Chi-squared = 28.063, df = 44, p-value = 0.9705 > ser11 <- serial.test(gvar, lags.pt = 12, type = "PT.asymptotic"); ser11$serial Portmanteau Test (asymptotic) data: Residuals of VAR object gvar Chi-squared = 25.118, df = 40, p-value = 0.9681 > ser11 <- serial.test(gvar, lags.pt = 11, type = "PT.asymptotic"); ser11$serial Portmanteau Test (asymptotic) data: Residuals of VAR object gvar Chi-squared = 22.243, df = 36, p-value = 0.9648 > ser11 <- serial.test(gvar, lags.pt = 10, type = "PT.asymptotic"); ser11$serial Portmanteau Test (asymptotic) data: Residuals of VAR object gvar Chi-squared = 21.209, df = 32, p-value = 0.927 > ser11 <- serial.test(gvar, lags.pt = 9, type = "PT.asymptotic"); ser11$serial Portmanteau Test (asymptotic) data: Residuals of VAR object gvar Chi-squared = 19.396, df = 28, p-value = 0.8855 > ser11 <- serial.test(gvar, lags.pt = 8, type = "PT.asymptotic"); ser11$serial Portmanteau Test (asymptotic) data: Residuals of VAR object gvar Chi-squared = 18.38, df = 24, p-value = 0.7842 > ser11 <- serial.test(gvar, lags.pt = 7, type = "PT.asymptotic"); ser11$serial Portmanteau Test (asymptotic) data: Residuals of VAR object gvar Chi-squared = 15.247, df = 20, p-value = 0.7621 > ser11 <- serial.test(gvar, lags.pt = 6, type = "PT.asymptotic"); ser11$serial Portmanteau Test (asymptotic) data: Residuals of VAR object gvar Chi-squared = 12.703, df = 16, p-value = 0.6944 > ser11 <- serial.test(gvar, lags.pt = 5, type = "PT.asymptotic"); ser11$serial Portmanteau Test (asymptotic) data:Residuals of VAR object gvar Chi-squared = 12.033, df = 12, p-value = 0.443 > ser11 <- serial.test(gvar, lags.pt = 4, type = "PT.asymptotic"); ser11$serial Portmanteau Test (asymptotic) data: Residuals of VAR object gvar Chi-squared = 10.358, df = 8, p-value = 0.2408 > ser11 <- serial.test(gvar, lags.pt = 3, type = "PT.asymptotic"); ser11$serial Portmanteau Test (asymptotic) data: Residuals of VAR object gvar Chi-squared = 4.8489, df = 4, p-value = 0.3032 > ser11 <- serial.test(gvar, lags.pt = 2, type = "PT.asymptotic"); ser11$serial Portmanteau Test (asymptotic) data: Residuals of VAR object gvar Chi-squared = 3.1567, df = 0, p-value < 2.2e-16 > norm1 <- normality.test(gvar);norm1$jb.mul $JB JB-Test (multivariate) data: Residuals of VAR object gvar Chi-squared = 0.4718, df = 4, p-value = 0.9762 $Skewness Skewness only (multivariate) data: Residuals of VAR object gvar Chi-squared = 0.21039, df = 2, p-value = 0.9001 $Kurtosis Kurtosis only (multivariate) data: Residuals of VAR object gvar Chi-squared = 0.26141, df = 2, p-value = 0.8775 > arch1 <- arch.test(gvar, lags.multi = 5);arch1$arch.mul ARCH (multivariate) data: Residuals of VAR object gvar Chi-squared = 49.204, df = 45, p-value = 0.3086 > # residuals checking > plot(arch1, names = "M1") > plot(arch1, names = "R") > plot(stability(gvar), nc = 2); # H0 = STABILITY > # VARIANCE DECOMPOSITION > fevd(gvar, n.ahead = 15) $R R M1 [1,] 1.0000000 0.0000000 [2,] 0.9261224 0.0738776 [3,] 0.8352334 0.1647666 [4,] 0.7659168 0.2340832 [5,] 0.7147681 0.2852319 [6,] 0.6769925 0.3230075 [7,] 0.6514082 0.3485918 [8,] 0.6360163 0.3639837 [9,] 0.6278636 0.3721364 [10,] 0.6243328 0.3756672 [11,] 0.6235493 0.3764507 [12,] 0.6242637 0.3757363 [13,] 0.6256775 0.3743225 [14,] 0.6273080 0.3726920 [15,] 0.6288850 0.3711150 $M1 R M1 [1,] 0.002875338 0.9971247 [2,] 0.247926550 0.7520735 [3,] 0.380015555 0.6199844 [4,] 0.437689936 0.5623101 [5,] 0.469875016 0.5301250 [6,] 0.492950195 0.5070498 [7,] 0.510553682 0.4894463 [8,] 0.523726400 0.4762736 [9,] 0.533426085 0.4665739 [10,] 0.540510804 0.4594892 [11,] 0.545628095 0.4543719 [12,] 0.549262149 0.4507379 [13,] 0.551789602 0.4482104 [14,] 0.553506435 0.4464936 [15,] 0.554642007 0.4453580 > # IMPULSE RESPONSE FUNCTION > # FOR R -> M1 > IRFM1 = irf(gvar, impulse = "R", response = c("M1"), boot = + TRUE, n.ahead=15,ci=0.95); IRFM1;plot(IRFM1) Impulse response coefficients $R M1 [1,] -24.01946 [2,] -366.07288 [3,] -432.65608 [4,] -379.64172 [5,] -335.62101 [6,] -306.84908 [7,] -277.32335 [8,] -244.59288 [9,] -211.95348 [10,] -181.39309 [11,] -153.40818 [12,] -128.13053 [13,] -105.65505 [14,] -85.98609 [15,] -69.01670 [16,] -54.56514 Lower Band, CI= 0.95 $R M1 [1,] -129.4027 [2,] -505.2053 [3,] -597.9857 [4,] -546.4038 [5,] -507.9629 [6,] -489.0544 [7,] -455.4713 [8,] -356.9681 [9,] -301.1448 [10,] -256.6318 [11,] -218.5784 [12,] -183.8940 [13,] -150.4891 [14,] -134.5395 [15,] -123.4583 [16,] -113.2513 Upper Band, CI= 0.95 $R M1 [1,] 104.156459 [2,] -98.327407 [3,] -125.585207 [4,] -47.692715 [5,] -8.646694 [6,] 70.303894 [7,] 71.588619 [8,] 59.041029 [9,] 62.896604 [10,] 118.235047 [11,] 139.728198 [12,] 133.944820 [13,] 136.286059 [14,] 143.793237 [15,] 102.908433 [16,] 73.836164 > # FOR R -> R > IRFR = irf(gvar, impulse = "R", response = c("R"), boot = + TRUE, n.ahead=15,ci=0.95); IRFR;plot(IRFR) Impulse response coefficients $R R [1,] 1.40203658 [2,] 1.17219409 [3,] 0.51734455 [4,] 0.12330862 [5,] -0.07075992 [6,] -0.19936004 [7,] -0.29482626 [8,] -0.35452030 [9,] -0.38228951 [10,] -0.38702897 [11,] -0.37620898 [12,] -0.35495296 [13,] -0.32703957 [14,] -0.29543269 [15,] -0.26239553 [16,] -0.22957043 Lower Band, CI= 0.95 $R R [1,] 1.0093853 [2,] 0.5046052 [3,] -0.1930699 [4,] -0.5855353 [5,] -0.7391841 [6,] -0.6386010 [7,] -0.6885408 [8,] -0.7821425 [9,] -0.7606070 [10,] -0.6869465 [11,] -0.6570140 [12,] -0.6090838 [13,] -0.5343836 [14,] -0.4928135 [15,] -0.4450044 [16,] -0.3943514 Upper Band, CI= 0.95 $R R [1,] 1.66504821 [2,] 1.60452327 [3,] 1.03423652 [4,] 0.54452930 [5,] 0.16586024 [6,] 0.08795477 [7,] 0.07413740 [8,] 0.06692587 [9,] 0.10940924 [10,] 0.09354612 [11,] 0.07319918 [12,] 0.04176290 [13,] 0.03707668 [14,] 0.09075407 [15,] 0.11875789 [16,] 0.13119084 > ##### > # FOR M1 -> R > IRFM1 = irf(gvar, impulse = "M1", response = c("R"), boot = + TRUE, n.ahead=15,ci=0.95); IRFM1; plot(IRFM1) Impulse response coefficients $M1 R [1,] 0.0000000 [2,] 0.5161535 [3,] 0.6672451 [4,] 0.6289079 [5,] 0.5834877 [6,] 0.5496872 [7,] 0.5091896 [8,] 0.4597863 [9,] 0.4072263 [10,] 0.3555206 [11,] 0.3063502 [12,] 0.2605934 [13,] 0.2188696 [14,] 0.1815251 [15,] 0.1486357 [16,] 0.1200812 Lower Band, CI= 0.95 $M1 R [1,] 0.00000000 [2,] 0.09908932 [3,] 0.14560273 [4,] -0.02241492 [5,] -0.07462619 [6,] -0.06731903 [7,] -0.07782605 [8,] -0.10535767 [9,] -0.15670871 [10,] -0.25715848 [11,] -0.28562277 [12,] -0.25186633 [13,] -0.24358790 [14,] -0.25354556 [15,] -0.28601416 [16,] -0.26641785 Upper Band, CI= 0.95 $M1 R [1,] 0.0000000 [2,] 0.8230671 [3,] 1.0917137 [4,] 1.0352449 [5,] 0.9137671 [6,] 0.7963934 [7,] 0.7408441 [8,] 0.6566320 [9,] 0.5171422 [10,] 0.4305844 [11,] 0.3654430 [12,] 0.2751083 [13,] 0.2226122 [14,] 0.1969125 [15,] 0.1749518 [16,] 0.1552076 > # FOR M1 -> M1 > IRFR = irf(gvar, impulse = "M1", response = c("M1"), boot = + TRUE, n.ahead=15,ci=0.95); IRFR; plot(IRFR) Impulse response coefficients $M1 M1 [1,] 447.29444 [2,] 456.27712 [3,] 341.62805 [4,] 271.27157 [5,] 232.74929 [6,] 198.02242 [7,] 163.33012 [8,] 132.19782 [9,] 105.78512 [10,] 83.53290 [11,] 64.82713 [12,] 49.27739 [13,] 36.54021 [14,] 26.25457 [15,] 18.06635 [16,] 11.65018 Lower Band, CI= 0.95 $M1 M1 [1,] 308.38706 [2,] 204.58111 [3,] 24.05020 [4,] -60.50809 [5,] -98.90887 [6,] -136.42739 [7,] -133.63199 [8,] -149.33572 [9,] -141.31264 [10,] -125.80934 [11,] -133.98960 [12,] -138.56635 [13,] -143.08566 [14,] -145.82633 [15,] -140.80743 [16,] -130.18343 Upper Band, CI= 0.95 $M1 M1 [1,] 485.23980 [2,] 491.31200 [3,] 412.04729 [4,] 332.71650 [5,] 308.64750 [6,] 267.56917 [7,] 205.83740 [8,] 164.98744 [9,] 151.63159 [10,] 148.00966 [11,] 141.53521 [12,] 131.97439 [13,] 121.47866 [14,] 111.81754 [15,] 103.50382 [16,] 96.30831 P-value > 0,05 H0 P-value <0,05 H1 O ideal é o modelo todo no H0, pois os resíduos são não-autocorrelacionados. Decomposição da variância em percentual mostra o impacto em uma variável provocado por um choque em outra variável. PLOTS:
Compartilhar