Las variables a análizar son GDP y PCE
plot(cbind(GDP.ts, PCE.ts))

Lo primero por hacer es la prueba de cointegración con el análisis
de los residuos
adf.test(residuos[,1])
## Augmented Dickey-Fuller Test
## alternative: stationary
##
## Type 1: no drift no trend
## lag ADF p.value
## [1,] 0 -12.28 0.01
## [2,] 1 -7.60 0.01
## [3,] 2 -6.48 0.01
## [4,] 3 -5.45 0.01
## [5,] 4 -4.67 0.01
## Type 2: with drift no trend
## lag ADF p.value
## [1,] 0 -12.23 0.01
## [2,] 1 -7.57 0.01
## [3,] 2 -6.45 0.01
## [4,] 3 -5.43 0.01
## [5,] 4 -4.65 0.01
## Type 3: with drift and trend
## lag ADF p.value
## [1,] 0 -12.19 0.01
## [2,] 1 -7.54 0.01
## [3,] 2 -6.43 0.01
## [4,] 3 -5.41 0.01
## [5,] 4 -4.63 0.01
## ----
## Note: in fact, p.value = 0.01 means p.value <= 0.01
adf.test(residuos[,2])
## Augmented Dickey-Fuller Test
## alternative: stationary
##
## Type 1: no drift no trend
## lag ADF p.value
## [1,] 0 -11.61 0.01
## [2,] 1 -6.85 0.01
## [3,] 2 -5.54 0.01
## [4,] 3 -5.08 0.01
## [5,] 4 -5.03 0.01
## Type 2: with drift no trend
## lag ADF p.value
## [1,] 0 -11.57 0.01
## [2,] 1 -6.82 0.01
## [3,] 2 -5.52 0.01
## [4,] 3 -5.06 0.01
## [5,] 4 -5.02 0.01
## Type 3: with drift and trend
## lag ADF p.value
## [1,] 0 -11.54 0.01
## [2,] 1 -6.80 0.01
## [3,] 2 -5.50 0.01
## [4,] 3 -5.05 0.01
## [5,] 4 -5.00 0.01
## ----
## Note: in fact, p.value = 0.01 means p.value <= 0.01
En ambos casos se obtienen p-valor menores a 0.05 por lo cual se
puede concluir que las dos son estacionarias por lo tanto existe
cointegración y existe relación a largo plazo
prueba.P0 = ca.po(datos1, type="Pz")
summary(prueba.P0)
##
## ########################################
## # Phillips and Ouliaris Unit Root Test #
## ########################################
##
## Test of type Pz
## detrending of series none
##
## Response GDP.ts :
##
## Call:
## lm(formula = GDP.ts ~ zr - 1)
##
## Residuals:
## Min 1Q Median 3Q Max
## -150.279 -18.515 2.796 27.331 141.137
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## zrGDP.ts 0.95334 0.03958 24.089 <2e-16 ***
## zrPCE.ts 0.08483 0.06116 1.387 0.168
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 37.23 on 133 degrees of freedom
## Multiple R-squared: 0.9999, Adjusted R-squared: 0.9999
## F-statistic: 5.421e+05 on 2 and 133 DF, p-value: < 2.2e-16
##
##
## Response PCE.ts :
##
## Call:
## lm(formula = PCE.ts ~ zr - 1)
##
## Residuals:
## Min 1Q Median 3Q Max
## -104.417 -8.223 1.965 11.714 48.952
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## zrGDP.ts 0.007454 0.021281 0.35 0.727
## zrPCE.ts 0.996942 0.032886 30.32 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 20.02 on 133 degrees of freedom
## Multiple R-squared: 0.9999, Adjusted R-squared: 0.9999
## F-statistic: 7.855e+05 on 2 and 133 DF, p-value: < 2.2e-16
##
##
##
## Value of test-statistic is: 13.4923
##
## Critical values of Pz are:
## 10pct 5pct 1pct
## critical values 33.9267 40.8217 55.1911
prueba.P2 = ca.po(datos1, type="Pu")
summary(prueba.P2)
##
## ########################################
## # Phillips and Ouliaris Unit Root Test #
## ########################################
##
## Test of type Pu
## detrending of series none
##
##
## Call:
## lm(formula = z[, 1] ~ z[, -1] - 1)
##
## Residuals:
## Min 1Q Median 3Q Max
## -185.94 -32.81 29.65 77.98 145.10
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## z[, -1] 1.54450 0.00323 478.1 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 81.14 on 135 degrees of freedom
## Multiple R-squared: 0.9994, Adjusted R-squared: 0.9994
## F-statistic: 2.286e+05 on 1 and 135 DF, p-value: < 2.2e-16
##
##
## Value of test-statistic is: 13.4278
##
## Critical values of Pu are:
## 10pct 5pct 1pct
## critical values 20.3933 25.9711 38.3413
La prueba de Philips y Oularis es otro método de evaluación de la
cointegración
El resultado muestra que los residuos son estacionarios por lo cual
existe cointegración y relación a largo plazo
Se realiza la prueba para evaluar si se tiene relación a corto
plazo
MCE$coefficients[3]
## res3_1
## -0.1520933
abs(MCE$coefficients[3])
## res3_1
## 0.1520933
El resultado de la prueba muestra un valor negativo y con un valor
absoluto menor a 1 por lo cual se puede concluir que si existe relación
a corto plazo