You are on page 1of 17

Facultad de Economa

Universidad del Rosario

Jess Otero Cardona.

Ejemplo 1: Prueba de raz unitaria de Dickey y Fuller

Este ejemplo utiliza informacin del archivo erate1.wf1. Sea LO el logaritmo de la tasa de
cambio oficial peso-dlar en Colombia para el perodo 1970:1 a 1991:11 con una
frecuencia mensual.

Tasa de cambio

Diferencia de la tasa de cambio

7.0

0.06

6.5

0.05

6.0

0.04

5.5
0.03

5.0
0.02

4.5

0.01

4.0

0.00

3.5

79 80 81 82 83 84 85 86 87 88 89 90 91

79 80 81 82 83 84 85 86 87 88 89 90 91

DLO

LO

Funcin de autocorrelacin del logaritmo de la tasa de cambio


en niveles y primeras diferencias
1.0
0.9
0.8
0.7
0.6
0.5
0.4
2

10

12
LO

14

16

18

20

22

24

DLO

Facultad de Economa
Universidad del Rosario

Jess Otero Cardona.

Para efectuar la prueba ADF seleccionamos p Max = 12 aunque los rezagos 2 a 12 no son
estadsticamente significativos por lo que el modelo escogido nicamente incluye un
rezago de la variable dependiente.

Prueba Aumentada de Dickey y Fuller


(Modelo con intercepto y tendencia)
Dependent Variable: DLO
Sample(adjusted): 1970:03 1991:11, 261 observaciones
Variable
Coefficient Std. Error t-Statistic
C
0.002042 0.001833 1.113679
T
1.81E-05 1.07E-05 1.696677
LO(-1)
-0.000579 0.000733 -0.789413
DLO(-1)
0.863409 0.031589 27.33271
Breusch-Godfrey Serial Correlation LM(12) F Test
ADF Test
-0.789413
H0 : = 0

Prob.
0.2665
0.0910
0.4306
0.0000

0.922785
p.val
5% Critical Value*

0.524668
-3.4283

5% Critical Value*

6.34

5% Critical Value*

4.75

*MacKinnon (1991).

H 0 : 1 = = 0

4.717332

* Dickey y Fuller (1981), Tabla VI, n = 250 observaciones.

H 0 : 0 = 1 = = 0 5.939307

* Dickey y Fuller (1981), Tabla V, n = 250 observaciones.

Facultad de Economa
Universidad del Rosario

Jess Otero Cardona.

Prueba Aumentada de Dickey y Fuller


(Modelo con intercepto)
Dependent Variable: DLO
Sample(adjusted): 1970:03 1991:11, 261 observaciones
Variable
Coefficient Std. Error t-Statistic
C
-0.000758 0.000801 -0.946517
LO(-1)
0.000600 0.000235 2.551187
DLO(-1)
0.873904 0.031090 28.10901
Breusch-Godfrey Serial Correlation LM(12) F Test:
ADF Test

H0 : = 0

2.551187

H0 :0 = = 0

7.415605

0.907279

Prob.
0.3448
0.0113
0.0000
p.val

5% Critical Value*

0.540260
-2.8727

*MacKinnon (1991).

5% Critical Value*

4.63

* Dickey y Fuller (1981), Tabla IV, n = 250 observaciones.

CONCLUSION: LO es I(1) con deriva

Facultad de Economa
Universidad del Rosario

Jess Otero Cardona.

Ejemplo 2: Prueba de cointegracin donde el vector de cointegracin es conocido

En este ejemplo se utiliza el archivo us_rates.wf1, que contiene informacin trimestral


para el perodo 1960:1 a 1995:4 de las tasas de inters a corto (3 meses) y largo plazo (mas
de 10 aos) en los Estados Unidos. La teora de la estructura de las tasas de inters indica
que la diferencia o spread entre la tasa de largo plazo y la tasa de corto plazo debe ser
estacionario, pues de otra forma se presentaran oportunidades de ganancias
extraordinarias. Es decir, en el largo el diferencial entre las dos tasa debe ser relativamente
constante, o por lo menos debe fluctuar alrededor de un determinado nivel.
Tasas de inters
16
14
12
10
8
6
4
2
60

65

70

75

80
R3

85

90

95

RL

Diferencial de tasas de inters


6

-2

-4
60

65

70

75

80

85

90

95

SPREAD

Facultad de Economa
Universidad del Rosario

Jess Otero Cardona.

Funcin de autocorrelacin de las series de tasas de inters


1.0

1.0

0.8

0.8

0.6

0.6

0.4
0.4
0.2
0.2

0.0

0.0

-0.2
-0.4

-0.2
1

6
R3

10 11 12

DR3

6
RL

10 11 12

DRL

Funcin de autocorrelacin del diferencial de tasas de inters


1.0

0.8

0.6

0.4

0.2

0.0
1

9 10 11 12

SPREAD

Facultad de Economa
Universidad del Rosario

Jess Otero Cardona.

Pruebas de Raz Unitaria sobre las series R3 y RL


Dependent Variable: DR3
Sample(adjusted): 1960:3 1998:4, 154 observaciones
Variable
Coefficient Std. Error t-Statistic
C
0.394016 0.169399 2.325966
T
0.000311 0.001392 0.223454
R3(-1)
-0.069102 0.024825 -2.783581
DR3(-1)
0.390297 0.078898 4.946842
DR3(-2)
-0.409847 0.082876 -4.945304
DR3(-3)
0.418391 0.084856 4.930622
DR3(-4)
-0.168250 0.082241 -2.045817
DR3(-5)
0.282749 0.079082 3.575404

Prob.
0.0214
0.8235
0.0061
0.0000
0.0000
0.0000
0.0426
0.0005

Breusch-Godfrey Serial Correlation LM(4) F Test:


1.302885
p.val
ADF Test
H0 : = 0
-2.783581
5% Critical Value*
*MacKinnon (1991).
4.080839
5% Critical Value*
3
H 0 : 1 = = 0
* Dickey y Fuller (1981), Tabla VI, n = 250 observaciones.
2.721680
5% Critical Value*
2
H 0 : 0 = 1 = = 0
* Dickey y Fuller (1981), Tabla V, n = 250 observaciones.
Dependent Variable: DR3
Sample(adjusted): 1960:3 1998:4, 154 observaciones
Variable
Coefficient Std. Error t-Statistic
C
0.409664 0.153747 2.664530
R3(-1)
-0.067435 0.023600 -2.857362
DR3(-1)
0.388757 0.078342 4.962285
DR3(-2)
-0.411065 0.082429 -4.986926
DR3(-3)
0.416526 0.084171 4.948578
DR3(-4)
-0.169428 0.081806 -2.071102
DR3(-5)
0.280856 0.078372 3.583625
Breusch-Godfrey Serial Correlation LM(4) F Test:

1.288493

0.271859
-3.4396
6.34
4.75

Prob.
0.0086
0.0049
0.0000
0.0000
0.0000
0.0401
0.0005
p.val

-2.857362
5% Critical Value*
ADF Test
H0 : = 0
*MacKinnon (1991).
4.083949
5% Critical Value*
1
H0 :0 = = 0
*Dickey y Fuller (1981), Tabla IV, n = 250 observaciones.

0.277345
-2.8802
4.63

CONCLUSION: R3 es I(1) sin deriva

Facultad de Economa
Universidad del Rosario

Jess Otero Cardona.

Dependent Variable: DRL


Sample(adjusted): 1960:3 1998:4, 154 observaciones
Variable
Coefficient Std. Error t-Statistic
C
0.167370 0.110763 1.511065
T
-0.000697 0.000986 -0.707084
RL(-1)
-0.014021 0.018231 -0.769044
DRL(-1)
0.243679 0.081825 2.978034
DRL(-2)
-0.042026 0.084214 -0.499037
DRL(-3)
0.114329 0.084116 1.359187
DRL(-4)
-0.011158 0.084425 -0.132160
DRL(-5)
-0.171814 0.082645 -2.078954
Breusch-Godfrey Serial Correlation LM(4) F Test:

0.307083

Prob.
0.1329
0.4806
0.4431
0.0034
0.6185
0.1762
0.8950
0.0394
p.val

-0.707084
5% Critical Value*
ADF Test
H0 : = 0
*MacKinnon (1991).
1.370962
5% Critical Value*
3
H 0 : 1 = = 0
* Dickey y Fuller (1981), Tabla VI, n = 250 observaciones.
5% Critical Value*
2
H 0 : 0 = 1 = = 0 0.932376
*Dickey y Fuller (1981), Tabla V, n = 250 observaciones.
Dependent Variable: DRL
Sample(adjusted): 1960:3 1998:4, 154 observaciones
Variable
Coefficient Std. Error t-Statistic
C
0.165717 0.110550 1.499020
RL(-1)
-0.021787 0.014526 -1.499869
DRL(-1)
0.252549 0.080721 3.128680
DRL(-2)
-0.034624 0.083419 -0.415064
DRL(-3)
0.123146 0.083045 1.482884
DRL(-4)
-0.003485 0.083582 -0.041690
DRL(-5)
-0.162115 0.081359 -1.992574
Breusch-Godfrey Serial Correlation LM(4) F Test:

0.295350

0.872864
-3.4396
6.34
4.75

Prob.
0.1360
0.1358
0.0021
0.6787
0.1402
0.9668
0.0482
p.val

-1.499869
5% Critical Value*
ADF Test
H0 : = 0
*MacKinnon (1991).
1.152500
5% Critical Value*
1
H0 :0 = = 0
*Dickey y Fuller (1981), Tabla IV, n = 250 observaciones.

0.880605
-2.8802
4.63

CONCLUSION: RL es I(1) sin deriva

Facultad de Economa
Universidad del Rosario

Jess Otero Cardona.

Dependent Variable: DSPREAD


Sample(adjusted): 1960:3 1998:4, 154 observaciones
Variable
Coefficient Std. Error t-Statistic
C
0.163243 0.066131 2.468470
SPREAD(-1)
-0.134698 0.038280 -3.518781
DSPREAD(-1)
0.302477 0.080141 3.774311
DSPREAD(-2)
-0.270036 0.081796 -3.301334
DSPREAD(-3)
0.263063 0.083988 3.132148
DSPREAD(-4)
-0.094134 0.079880 -1.178433
DSPREAD(-5)
0.265657 0.079037 3.361173
Breusch-Godfrey Serial Correlation LM(4) F Test:

ADF Test Statistic

0.811699

Prob.
0.0147
0.0006
0.0002
0.0012
0.0021
0.2405
0.0010
p.val

-3.518781

1% Critical Value*
5% Critical Value
10% Critical Value
*MacKinnon critical values for rejection of hypothesis of a unit root.

0.519647

-3.4738
-2.8802
-2.5766

CONCLUSION: La hiptesis nula de la presencia de una raz unitaria se rechaza, lo que


indica que el diferencial entre las dos tasas de inters es estacionario.
Es decir las dos series estn cointegradas con vector (1,1)' .

Facultad de Economa
Universidad del Rosario

Jess Otero Cardona.

Ejemplo 3: Prueba de cointegracin donde el vector de cointegracin NO es conocido

En este ejemplo se utiliza el archivo coffee.wf1, que contiene informacin trimestral para
el perodo 1963:1 a 1998:2 de las series de precios del caf Colombiano (COL) y de la
variedad de Otros Suaves (OM) en el mercado de Nueva York. Las dos series estn en
logaritmos. Como estas dos variedades de caf pueden ser consideradas como sustitutas,
estamos interesados en investigar si los precios de estas dos variedades mantienen una
relacin de equilibrio de largo plazo, de forma tal que los desequilibrios de corto plazo
desaparecen en el tiempo.

6.0

5.5

5.0

4.5

4.0

3.5
65

70

75

80
LCOL

1.0

1.0

0.8

0.8

0.6

0.6

0.4

0.4

0.2

0.2

0.0

0.0

-0.2

-0.2

-0.4

85

90

95

LOM

-0.4
1

COL

DCOL

10 11 12

6
OM

10 11 12

DOM

Facultad de Economa
Universidad del Rosario

Jess Otero Cardona.

Residuos de la ecuacin de cointegracin

0.3

0.2

0.2

0.1

0.1

0.0

0.0

-0.1

-0.1

-0.2

-0.2

-0.3
65

70

75

80

85

90

95

65

70

75

LCOL Residuals

0.8

80

85

90

95

LOM Residuals

0.8

0.6

0.6

0.4
0.4
0.2
0.2

0.0

0.0

-0.2
1

9 10 11 12

LCOL residuals

9 10 11 12

LOM residuals

10

Facultad de Economa
Universidad del Rosario

Jess Otero Cardona.

Dependent Variable: DLCOL


Sample: 1963:1 1998:2, 142 observaciones
Variable
Coefficient Std. Error t-Statistic
C
0.230706 0.102414 2.252686
T
0.000385 0.000349 1.102107
LCOL(-1)
-0.055900 0.026199 -2.133644
DLCOL(-1)
0.387277 0.083922 4.614719
DLCOL(-2)
-0.288190 0.087868 -3.279811
DLCOL(-3)
0.322602 0.086542 3.727702
DLCOL(-4)
-0.171226 0.086683 -1.975316
Breusch-Godfrey Serial Correlation LM(4) F Test:

1.680104

Prob.
0.0259
0.2724
0.0347
0.0000
0.0013
0.0003
0.0503
p.val

ADF Test
-2.133644
5% Critical Value*
H0 : = 0
*MacKinnon (1991).
3
2.392271
5% Critical Value*
H 0 : 1 = = 0
* Dickey y Fuller (1981), Tabla VI, n = 250 observaciones.
2
1.781207
5% Critical Value*
H 0 : 1 = = 0
*Dickey y Fuller (1981), Tabla V, n = 250 observaciones.
Dependent Variable: DLCOL
Sample: 1963:1 1998:2, 142 observaciones
Variable
Coefficient Std. Error t-Statistic
C
0.172838 0.087999 1.964091
LCOL(-1)
-0.036215 0.019182 -1.887930
DLCOL(-1)
0.379779 0.083712 4.536740
DLCOL(-2)
-0.302425 0.086982 -3.476859
DLCOL(-3)
0.315664 0.086380 3.654339
DLCOL(-4)
-0.183685 0.086010 -2.135620
Breusch-Godfrey Serial Correlation LM(4) F Test:

1.884466

0.158394
-3.4419
6.34
4.75

Prob.
0.0516
0.0612
0.0000
0.0007
0.0004
0.0345
p.val

ADF Test
-1.887930
5% Critical Value*
H0 : = 0
*MacKinnon (1991).
1
2.061238
5% Critical Value*
H0 :0 = = 0
*Dickey y Fuller (1981), Tabla IV, n = 250 observaciones.

0.116862
-2.8818
4.63

11

Facultad de Economa
Universidad del Rosario

Jess Otero Cardona.

Dependent Variable: DLOM


Sample: 1963:1 1998:2, 142 observaciones
Variable
Coefficient Std. Error t-Statistic
C
0.255180 0.107232 2.379713
T
0.000469 0.000381 1.231976
LOM(-1)
-0.063997 0.028235 -2.266542
DLOM(-1)
0.392579 0.084162 4.664577
DLOM(-2)
-0.228349 0.089680 -2.546263
DLOM(-3)
0.247044 0.088459 2.792744
DLOM(-4)
-0.159291 0.086565 -1.840127
Breusch-Godfrey Serial Correlation LM(4) F Test:

2.110043

Prob.
0.0187
0.2201
0.0250
0.0000
0.0120
0.0060
0.0679
p.val

ADF Test
-2.266542
5% Critical Value*
H0 : = 0
*MacKinnon (1991).
3
2.682571
5% Critical Value*
H 0 : 1 = = 0
* Dickey y Fuller (1981), Tabla VI, n = 250 observaciones.
2
5% Critical Value*
H 0 : 0 = 1 = = 0 1.962719
*Dickey y Fuller (1981), Tabla V, n = 250 observaciones.

0.083129
-3.4419
6.34
4.75

Dependent Variable: DLOM


Sample: 1963:1 1998:2
Included observations: 142
Variable
C
LOM(-1)
DLOM(-1)
DLOM(-2)
DLOM(-3)
DLOM(-4)

Coefficient Std. Error


0.186005
-0.039821
0.383339
-0.244866
0.238044
-0.174907

t-Statistic

Prob.

0.091529 2.032196
0.020340 -1.957750
0.083986 4.564304
0.088841 -2.756227
0.088325 2.695099
0.085795 -2.038665

0.0441
0.0523
0.0000
0.0066
0.0079
0.0434

Breusch-Godfrey Serial Correlation LM(4) F Test:

2.415452

p.val

ADF Test
-1.957750 5% Critical Value*
H0 : = 0
*MacKinnon (1991).
1
2.176907
5% Critical Value*
H0 :0 = = 0
*Dickey y Fuller (1981), Tabla IV, n = 250 observaciones.

0.051960
-2.8818
4.63

12

Facultad de Economa
Universidad del Rosario

Jess Otero Cardona.

PRUEBA DE COINTEGRACION

1 Etapa: ECUACION DE COINTEGRACION

(Normalizando en LCOL)
Dependent Variable: LCOL
Sample: 1963:1 1998:2, 142 observaciones
Variable
Coefficient Std. Error
C
0.185711 0.038824
LOM
0.978268 0.008565
R-squared
Adjusted R-squared
S.E. of regression
Sum squared resid
Log likelihood
Durbin-Watson stat

0.989383
0.989307
0.058355
0.476737
202.9706
0.652722

t-Statistic
4.783458
114.2219

Prob.
0.0000
0.0000

Mean dependent var


S.D. dependent var
AIC
SBC
F-statistic
Prob(F-statistic)

4.584798
0.564329
-2.83057
-2.78894
13046.63
0.000000

2 Etapa: PRUEBA DE COINTEGRACION

Dependent Variable: DRESCOL


Sample(adjusted): 1963:2 1998:2, 141 observaciones
Variable
Coefficient Std. Error t-Statistic
C
4.24E-05 0.003645 0.011618
RESCOL(-1)
-0.326328 0.062694 -5.205051
Breusch-Godfrey Serial Correlation LM(4) F Test:

0.710435

Prob.
0.9907
0.0000
p.val

0.586156

13

Facultad de Economa
Universidad del Rosario

Jess Otero Cardona.

1 Etapa: ECUACION DE COINTEGRACION

(Normalizando en LOM)
Dependent Variable: LOM
Sample: 1963:1 1998:2, 142 observaciones
Variable
Coefficient Std. Error t-Statistic
C
-0.140079 0.040900 -3.424950
LCOL
1.011362 0.008854 114.2219
R-squared
Adjusted R-squared
S.E. of regression
Sum squared resid
Log likelihood
Durbin-Watson stat

0.989383
0.989307
0.059333
0.492864
200.6084
0.657980

Mean dependent var


S.D. dependent var
AIC
SBC
F-statistic
Prob(F-statistic)

Prob.
0.0008
0.0000
4.496812
0.573795
-2.79730
-2.75567
13046.63
0.000000

2 Etapa: PRUEBA DE COINTEGRACION

Dependent Variable: DRESLOM


Sample(adjusted): 1963:2 1998:2, 141 observaciones
Variable
Coefficient Std. Error t-Statistic
C
4.69E-05 0.003718 0.012617
RESLOM(-1)
-0.329085 0.062887 -5.232931
Breusch-Godfrey Serial Correlation LM(4) F Test:

0.834670

Prob.
0.9900
0.0000
p.val

0.505398

14

Facultad de Economa
Universidad del Rosario

Jess Otero Cardona.

Ejemplo 4: Prueba de cointegracin donde el vector de cointegracin NO es conocido

En este ejemplo se estima una funcin de demanda por dinero para Estados Unidos
utilizando informacin trimestral del archivo us_mdemand.wf1. Las series utilizadas son
M2 (M2), PIB (Y), IPC (P) y tasa de inters a tres meses (R), y cubren el perodo 1959:1
hasta 1987:4. Todas las series, excepto la tasa de inters, se consideran en logaritmos.

Anlisis preliminar de las series indica:


M 2, Y , P ~ I (1) con deriva.
R ~ I (1) sin deriva
8.0

7.2
7.0

7.5

6.8
7.0
6.6
6.5
6.4
6.0

6.2
6.0

5.5
60

65

70

75

80

85

60

65

70

LM2

75

80

85

80

85

LY87

0.4

0.16
0.14

0.0
0.12
-0.4

0.10
0.08

-0.8

0.06
-1.2
0.04
0.02

-1.6
60

65

70

75

80

85

LP87

60

65

70

75
R3

Las series no han sido ajustadas estacionalmente.

15

Facultad de Economa
Universidad del Rosario

Jess Otero Cardona.

ECUACION DE COINTEGRACION

Dependent Variable: LM2


Sample: 1959:1 1987:4
Included observations: 116
Variable

Coefficient Std. Error

t-Statistic

Prob.

C
LY87
LP87
R3
Q1
Q2
Q3

0.238539
1.098189
0.974280
-1.178484
0.075808
0.027186
0.038600

0.116701 2.044026
0.016575 66.25694
0.009001 108.2367
0.086442 -13.63317
0.005111 14.83315
0.004984 5.454567
0.005002 7.716253

0.0434
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000

R-squared
Adjusted R-squared
S.E. of regression
Sum squared resid
Log likelihood
Durbin-Watson stat

0.999319
0.999281
0.018874
0.038827
299.5320
0.853537

Mean dependent var


S.D. dependent var
AIC
SBC
F-statistic
Prob(F-statistic)

6.751865
0.703896
-5.04366
-4.87749
26641.39
0.000000

PRUEBA DE COINTEGRACION

Dependent Variable: DRES


Sample(adjusted): 1960:4 1987:4
Included observations: 109 after adjusting endpoints
Variable

Coefficient Std. Error

C
RES(-1)
DRES(-1)
DRES(-2)
DRES(-3)
DRES(-4)
DRES(-5)
DRES(-6)

0.000592
-0.355761
-0.117389
-0.078701
-0.098111
0.295749
0.026334
0.194570

R-squared
Adjusted R-squared
S.E. of regression
Sum squared resid
Log likelihood
Durbin-Watson stat

0.413125
0.372451
0.013333
0.017955
320.0967
1.910775

t-Statistic

Prob.

0.461380
-3.611948
-0.996592
-0.678543
-0.844439
2.710069
0.255016
2.060149

0.6455
0.0005
0.3213
0.4990
0.4004
0.0079
0.7992
0.0420

Mean dependent var


S.D. dependent var
AIC
SBC
F-statistic
Prob(F-statistic)

0.000180
0.016831
-5.72655
-5.52902
10.15686
0.000000

0.001282
0.098496
0.117791
0.115985
0.116184
0.109130
0.103265
0.094445

16

Facultad de Economa
Universidad del Rosario

Jess Otero Cardona.

ECUACION DE COINTEGRACION

(Bajo los supuestos de homogeneidad en precios e ingreso)

Dependent Variable: LV2 = LM2 - LP87 - LY87


Sample: 1959:1 1987:4
Included observations: 116
Variable

t-Statistic

Prob.

0.006085 148.0422
0.071127 -12.76203
0.005869 11.57775
0.005870 4.102015
0.005869 5.868277
Mean dependent var
S.D. dependent var
AIC
SBC
F-statistic
Prob(F-statistic)

0.0000
0.0000
0.0000
0.0001
0.0000
0.876252
0.042376
-4.72193
-4.60324
75.61509
0.000000

Dependent Variable: DRES


Sample(adjusted): 1960:2 1987:4
Included observations: 111 after adjusting endpoints
Variable
Coefficient Std. Error t-Statistic

Prob.

C
R3
Q1
Q2
Q3
R-squared
Adjusted R-squared
S.E. of regression
Sum squared resid
Log likelihood
Durbin-Watson stat

C
RES(-1)
DRES(-1)
DRES(-2)
DRES(-3)
DRES(-4)
R-squared
Adjusted R-squared
S.E. of regression
Sum squared resid
Log likelihood
Durbin-Watson stat

Coefficient Std. Error


0.900849
-0.907728
0.067953
0.024081
0.034442
0.731534
0.721860
0.022349
0.055442
278.8719
0.501077

0.000838
-0.230434
-0.128996
-0.011200
-0.186260
0.289957
0.361186
0.330767
0.012602
0.016676
331.0820
1.984401

0.001207 0.694401
0.066808 -3.449193
0.101012 -1.277036
0.096926 -0.115553
0.092641 -2.010558
0.089477 3.240590
Mean dependent var
S.D. dependent var
AIC
SBC
F-statistic
Prob(F-statistic)

0.4890
0.0008
0.2044
0.9082
0.0469
0.0016
0.000502
0.015405
-5.85733
-5.71087
11.87344
0.000000

17

You might also like