Está en la página 1de 14

Races Unitarias

WN

-2

-1

White Noise

20

40

60

80

100

LAG
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

AC
-0.0625
-0.0049
0.1004
-0.0084
0.0016
-0.0119
-0.0815
-0.1647
-0.0647
-0.0936
-0.0748
-0.1759
0.1354
-0.0503
0.0045
0.1356
-0.0310
0.0977
0.1438
-0.1145
0.1610
-0.0405
-0.0340
0.0385

PAC
-0.0632
-0.0099
0.1099
0.0023
-0.0052
-0.0251
-0.0961
-0.2000
-0.0944
-0.1077
-0.0849
-0.2436
0.1173
-0.0725
-0.0384
0.0663
-0.0824
0.0546
0.1160
-0.2285
0.2226
-0.1300
-0.0254
0.0552

Q
.40201
.40453
1.4635
1.4711
1.4714
1.4869
2.2152
5.2244
5.6939
6.6862
7.3268
10.913
13.062
13.363
13.365
15.598
15.716
16.903
19.506
21.178
24.525
24.74
24.893
25.092

Prob>Q

-1
0
1 -1
0
1
[Autocorrelation] [Partial Autocor]

0.5261
0.8169
0.6907
0.8317
0.9163
0.9604
0.9470
0.7333
0.7701
0.7547
0.7720
0.5364
0.4430
0.4982
0.5741
0.4813
0.5440
0.5298
0.4248
0.3867
0.2683
0.3097
0.3558
0.4008

NO HAY AC

TENDENCIA DETERMINSTICA
SE PUEDE PREDECIR LA TENDENCIA

20

40

60

80

100

Tendencia Determinstica

20

40

60

80

100

LAG
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

AC
0.9700
0.9400
0.9100
0.8801
0.8502
0.8204
0.7907
0.7610
0.7314
0.7020
0.6726
0.6434
0.6144
0.5855
0.5567
0.5282
0.4998
0.4716
0.4437
0.4160
0.3885
0.3613
0.3343
0.3076

PAC

Q
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

96.941
188.91
276
358.3
435.92
508.96
577.52
641.73
701.7
757.55
809.4
857.39
901.64
942.29
979.48
1013.4
1044.1
1071.7
1096.5
1118.6
1138.1
1155.1
1169.9
1182.6

Prob>Q

-1
0
1 -1
0
1
[Autocorrelation] [Partial Autocor]

0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000

TENDENCIA ESTOCSTICA
HAY TENDENCIA PERO NO LA PUEDES DETERMINAR

-10

-5

eta

Tendencia Estocstica

20

40

60

80

100

LAG
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

AC
0.9348
0.8749
0.8002
0.7241
0.6420
0.5669
0.4767
0.3900
0.3260
0.2760
0.2236
0.1901
0.1666
0.1456
0.1509
0.1499
0.1464
0.1397
0.1419
0.1382
0.1344
0.1262
0.0936
0.0546

PAC
0.9950
-0.0238
-0.1537
0.0469
-0.0876
-0.0382
-0.1838
-0.0107
0.1568
0.0614
-0.0952
0.1727
0.1999
-0.0704
0.2149
-0.0385
0.0921
-0.0349
0.0129
-0.1335
-0.0834
-0.0112
-0.1527
-0.0001

Q
90.03
169.7
237.04
292.75
337
371.87
396.8
413.66
425.57
434.21
439.93
444.12
447.38
449.89
452.63
455.36
457.99
460.42
462.95
465.39
467.72
469.8
470.96
471.36

Prob>Q
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000

NONSTATIONARY PROCESS
RANDOM WALK PURO

-1
0
1 -1
0
1
[Autocorrelation] [Partial Autocor]

-5

y1

10

15

Pure RW

20

40

60

80

100

LAG

AC

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

0.9613
0.9279
0.8855
0.8404
0.8003
0.7562
0.7122
0.6714
0.6373
0.6060
0.5774
0.5517
0.5352
0.5106
0.4889
0.4680
0.4417
0.4215
0.3975
0.3676
0.3440
0.3083
0.2780
0.2449

PAC
0.9675
0.0405
0.0024
-0.1282
-0.0255
-0.0141
0.0006
0.0758
0.1852
0.0808
0.0965
0.0661
0.2360
-0.1412
0.0616
0.0091
-0.0866
0.0564
-0.0719
-0.1384
0.2292
-0.2336
0.1121
0.0057

Q
95.22
184.84
267.29
342.32
411.08
473.14
528.78
578.75
624.28
665.89
704.1
739.38
772.96
803.88
832.56
859.16
883.13
905.23
925.13
942.36
957.64
970.07
980.31
988.36

Prob>Q

-1
0
1 -1
0
1
[Autocorrelation] [Partial Autocor]

0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000

RANDOM WALK CON DRIFT

20

40

y2

60

80

100

RW con drift

20

40

60
t

80

100

LAG

AC

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

0.9720
0.9443
0.9145
0.8854
0.8574
0.8286
0.7996
0.7705
0.7409
0.7112
0.6811
0.6507
0.6204
0.5900
0.5597
0.5298
0.5006
0.4724
0.4448
0.4179
0.3912
0.3640
0.3379
0.3110

PAC

0.9989
0.0538
0.0189
-0.1109
-0.0072
0.0062
0.0218
0.0962
0.2015
0.0942
0.1095
0.0784
0.2455
-0.1288
0.0758
0.0254
-0.0683
0.0788
-0.0476
-0.1101
0.2554
-0.2057
0.1386
0.0339

-1
0
1 -1
0
1
[Autocorrelation] [Partial Autocor]

Prob>Q

97.338
190.14
278.08
361.37
440.31
514.81
584.94
650.76
712.28
769.61
822.77
871.85
916.97
958.25
995.85
1029.9
1060.7
1088.5
1113.4
1135.7
1155.4
1172.8
1187.9
1200.9

0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000

RW DRIFT + TENDENCIA

50

y3

100

150

RW drift + trend

20

40

60

80

LAG
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

AC
0.9714
0.9430
0.9131
0.8838
0.8552
0.8261
0.7969
0.7675
0.7378
0.7082
0.6781
0.6480
0.6178
0.5876
0.5576
0.5278
0.4985
0.4700
0.4420
0.4146
0.3874
0.3600
0.3335
0.3065

PAC
1.0052
0.0479
0.0143
-0.1157
-0.0118
0.0021
0.0173
0.0922
0.1974
0.0881
0.1029
0.0698
0.2357
-0.1446
0.0622
0.0067
-0.0885
0.0544
-0.0756
-0.1387
0.2302
-0.2338
0.1165
0.0088

Q
97.227
189.78
277.44
360.43
438.96
513.02
582.66
647.97
708.99
765.82
818.53
867.19
911.95
952.91
990.22
1024
1054.6
1082.1
1106.7
1128.6
1148
1164.9
1179.7
1192.3

Prob>Q
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000

[Autocorrelation]

[Partial Autocor]

100

RW CON DRIFT + TENDENCIA ESTOCSTICA

50

y4
100

150

200

RW drift + Stochastic trend

20

40

60

80

100

LAG
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

AC
0.9708
0.9386
0.9032
0.8649
0.8253
0.7852
0.7449
0.7052
0.6665
0.6285
0.5913
0.5549
0.5194
0.4856
0.4534
0.4223
0.3911
0.3615
0.3325
0.3039
0.2754
0.2450
0.2138
0.1818

PAC
0.9785
-0.9180
-0.3149
-0.1466
0.1101
-0.0211
-0.0316
0.1092
0.1151
-0.1099
-0.0134
0.0547
-0.0710
-0.2619
0.0105
0.0199
-0.1416
-0.0825
-0.1905
-0.0162
0.2287
-0.1641
0.1084
0.0496

Q
97.101
188.8
274.59
354.07
427.21
494.1
554.96
610.11
659.9
704.67
744.74
780.44
812.07
840.04
864.71
886.36
905.16
921.41
935.33
947.11
956.9
964.75
970.81
975.25

Prob>Q
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000

-1
0
1 -1
0
1
[Autocorrelation] [Partial Autocor]

Nonstationary Process
RW con drift

80
y2
60
0

-5

20

40

y1

10

100

15

Pure RW

40

60

80

100

40

60

80

RW drift + trend

RW drift + Stochastic trend

150

100

y4
100

y3 100

50

50
0
0

20

40

60

80

100

-4

-2

Proceso Estacionario

20

20

40

60
t

PROCESO ESTACIONARIO

y5

20

200

20

150

40

60
t

80

100

80

100

LAG

AC

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36

0.6528
0.4481
0.3362
0.1669
0.0115
-0.1279
-0.2662
-0.3678
-0.3758
-0.3772
-0.3388
-0.2727
-0.0954
-0.0325
0.0685
0.1779
0.1896
0.2452
0.2419
0.1429
0.1571
0.0546
-0.0218
-0.0604
-0.1471
-0.1509
-0.0685
0.0044
-0.0250
0.0006
0.0130
-0.0116
-0.0346
0.0145
-0.0479
-0.1550

PAC
0.6682
0.0382
0.0274
-0.1393
-0.1053
-0.1382
-0.1770
-0.1452
-0.0082
-0.0769
-0.0448
-0.0544
0.2015
-0.1311
0.0446
0.0322
-0.0720
0.0775
-0.0353
-0.1566
0.2257
-0.2244
0.0698
0.0026
-0.1052
0.0926
0.2833
0.1221
-0.1350
0.0976
-0.1443
-0.2681
0.0330
-0.1024
-0.1310
-0.3026

Q
43.912
64.809
76.696
79.655
79.669
81.443
89.213
104.21
120.04
136.16
149.32
157.94
159.01
159.13
159.69
163.54
167.96
175.44
182.8
185.41
188.59
188.98
189.05
189.54
192.48
195.62
196.28
196.28
196.37
196.37
196.39
196.41
196.6
196.63
196.99
200.82

Prob>Q

-1
0
1 -1
0
1
[Autocorrelation] [Partial Autocor]

0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000

PROCESO ESTACIONARIO +DRIFT

y6

Proceso Estacionario + drift

20

40

60
t

80

100

LAG

AC

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36

0.6571
0.4852
0.3547
0.1815
0.0523
-0.0735
-0.1860
-0.2710
-0.2878
-0.3021
-0.2877
-0.2435
-0.1103
-0.0682
0.0043
0.0974
0.1052
0.1847
0.2103
0.1603
0.2128
0.1250
0.0782
0.0434
-0.0608
-0.0875
-0.0329
0.0286
-0.0043
-0.0103
-0.0405
-0.0934
-0.0940
-0.0316
-0.0647
-0.1392

PAC

0.6687
0.0683
0.0213
-0.1388
-0.0790
-0.1099
-0.1247
-0.0874
0.0308
-0.0416
-0.0317
-0.0409
0.1661
-0.1377
0.0075
0.0098
-0.0845
0.0831
-0.0040
-0.0888
0.2694
-0.1628
0.1176
0.0405
-0.0961
0.0764
0.2310
0.0897
-0.1372
0.0624
-0.1591
-0.2644
0.0822
-0.0262
-0.0253
-0.1665

44.49
68.995
82.225
85.724
86.017
86.604
90.4
98.539
107.82
118.17
127.65
134.52
135.95
136.5
136.5
137.65
139.01
143.26
148.83
152.1
157.95
159.99
160.8
161.06
161.56
162.61
162.77
162.88
162.88
162.9
163.14
164.45
165.8
165.95
166.61
169.69

Prob>Q

-1
0
1 -1
0
1
[Autocorrelation] [Partial Autocor]

0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000

PROCESO ESTACIONARIO + DRIFT + TREND


Si hacemos prueba de raz unitaria sin considerar tendencia tiene raz unitaria, pero cuando
consideramos la tendencia no tendra raz unitaria (parece no estacionaria a primera vista, tiene
todas las caractersticas , se parece a un Rw con drift)

10

y7
20

30

40

Proceso Estacionario + drift +trend

20

40

60
t

80

100

LAG

AC

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36

0.9632
0.9324
0.8953
0.8617
0.8343
0.8051
0.7765
0.7482
0.7202
0.6931
0.6658
0.6387
0.6132
0.5858
0.5587
0.5317
0.5040
0.4792
0.4533
0.4266
0.4001
0.3685
0.3408
0.3097
0.2775
0.2505
0.2243
0.2026
0.1778
0.1526
0.1247
0.0984
0.0781
0.0582
0.0375
0.0186

PAC
0.9855
0.1998
0.1349
-0.0240
0.0536
0.0342
0.0246
0.0798
0.1996
0.1200
0.1271
0.1003
0.2945
-0.0480
0.1010
0.0790
-0.0213
0.1305
0.0343
-0.0570
0.3008
-0.1361
0.1508
0.0705
-0.0575
0.1249
0.2789
0.1374
-0.1040
0.1036
-0.1289
-0.2461
0.0946
-0.0168
-0.0187
-0.1524

Q
95.587
186.08
270.37
349.26
423.99
494.32
560.45
622.51
680.64
735.09
785.89
833.18
877.26
917.96
955.42
989.74
1021
1049.5
1075.4
1098.6
1119.3
1137
1152.4
1165.3
1175.8
1184.4
1191.4
1197.2
1201.8
1205.2
1207.5
1208.9
1209.9
1210.4
1210.6
1210.7

Prob>Q

-1
0
1 -1
0
1
[Autocorrelation] [Partial Autocor]

0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000

PROCESO ESTACIONARIO + DRIFT + TENDENCIA ESTOCSTICA


Como es estocstica no la podemos determinar

-30

-20

-10 y8

10

20

Proceso Estacionario + drift + stochastic trend

20

40

60

80

100

Parece no estacionaria, pero podra estar influencia por tendencia estocstica, prueba de races
unitarias no pueden incluir tendencia estocstica, la introduccin de tendencia estocstica hace
difcil identificar si el proceso es estacionario o no mediante races unitarias (nosotros sabemos
que lo es, pero grficamente no, si hacemos la prueba de races unitarios nos saldra que no es
estacionario)

LAG

AC

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36

PAC

0.9471
0.8846
0.8161
0.7341
0.6474
0.5636
0.4806
0.4045
0.3407
0.2830
0.2338
0.1973
0.1688
0.1472
0.1340
0.1247
0.1132
0.1077
0.1006
0.0888
0.0758
0.0514
0.0134
-0.0254
-0.0704
-0.1178
-0.1596
-0.2001
-0.2348
-0.2618
-0.2787
-0.2879
-0.2901
-0.2817
-0.2665
-0.2478

1.0256
-0.4560
-0.2252
-0.1878
0.0652
-0.0431
-0.0759
0.0839
0.1726
-0.0214
0.0562
0.1674
0.0967
-0.1494
0.0789
0.1432
-0.0309
0.0024
-0.1804
-0.0840
0.2151
-0.1987
0.0614
0.0205
0.0132
0.1153
0.1758
-0.1257
-0.1668
0.0517
0.0170
-0.0842
0.0941
0.0758
0.1683
0.0844

Q
92.42
173.87
243.9
301.16
346.17
380.63
405.96
424.1
437.12
446.2
452.47
456.98
460.32
462.89
465.04
466.93
468.51
469.95
471.22
472.23
472.97
473.31
473.34
473.42
474.1
476.01
479.57
485.24
493.16
503.15
514.63
527.07
539.88
552.14
563.29
573.08

Prob>Q

-1
0
1 -1
0
1
[Autocorrelation] [Partial Autocor]

0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000

Procesos Estacionarios

y6
0

-4

-2

y5

Proceso Estacionario + drift

Proceso Estacionario

20

40

60

80

100

20

40

60

80

100

Proceso Estacionario + drift +trend

Proceso Estacionario + drift + stochastic trend

-30

-20

10

-10 y8

y7
20

30

10

20

40

20

40

60
t

80

100

20

40

60
t

80

100

DO FILE:
clear
set obs 100
gen t = _n
tsset t
set seed 2013

*white noise
gen e = rnormal()
corrgram e, lags(24)
tsline e, title("White Noise")

*Tendencia determinstica
corrgram t, lags(24)
tsline t, title("Tendencia Determinstica")

*Tendencia estocstica (nt = nt-1 + et)


gen xi = rnormal()
gen eta = 0
replace eta = L1.eta + xi if t>1
corrgram eta, lags(24)
tsline eta, title("Tendencia Estocstica")

*Proceso no estacionario

*RW PURO
gen y1 = 0
replace y1 = L1.y1 + e if t>1
corrgram y1, lags(24)
tsline y1, title("Pure RW") name(g1, replace)

*RW con drift


gen y2 = 0
replace y2 = 1 + L1.y2 + e if t>1
corrgram y2, lags(24)
tsline y2, title("RW con drift") name(g2, replace)

*RW DRIFT + TENDENCIA

gen y3 = 0
replace y3 = 1 + 0.01*t + L1.y3 + e if t>1
corrgram y3, lags(24)
tsline y3, title("RW drift + trend") name(g3, replace)

*RW DRIFT + TEMDENCIA ESTOCSTICA


gen y4 = 0
replace y4 = 1 + eta + L1.y4 + e if t>1
corrgram y4, lags(24)
tsline y4, title("RW drift + Stochastic trend") name(g4, replace)

graph combine g1 g2 g3 g4, title("Nonstationary Process") cols(2) scale(0.8)


*Proceso estacionario

gen y5 = 0
replace y5 = 0.7*L1.y5 + e if t > 1
corrgram y5, lags(36)
tsline y5, title("Proceso Estacionario") name(g5,replace)

*Proceso Estacionario + Drift

gen y6 = 0
replace y6 = 1 + 0.7*L1.y6 + e if t > 1
corrgram y6, lags(36)
tsline y6, title("Proceso Estacionario + drift") name(g6,replace)

*Proceso estacionario + drift + trend


gen y7 = 0
replace y7 = 1 + 0.1*t + 0.7*L1.y7 + e if t > 1
corrgram y7, lags(36)
tsline y7, title("Proceso Estacionario + drift +trend") name(g7,replace)

*Proceso Estacionario + Drift + tendencia estocstica

gen y8 = 0
replace y8 = 1 + eta + 0.7*L1.y8 + e if t > 1
corrgram y8, lags(36)

tsline y8, title("Proceso Estacionario + drift + stochastic trend") name(g8,replace)

graph combine g5 g6 g7 g8, title("Procesos Estacionarios") cols(2) scale(0.8)

También podría gustarte