Você está na página 1de 25

2º TRABALHO PRÁTICO

NOME: LAIZ ESTHER GOMES

AULA PRÁTICA 1:

Primeiramente, tratei os dados:

No STATA, comecei reconhecendo que se tratava de uma série temporal com variação mensal
com início em janeiro de 1999 e término em fevereiro de 2012:

Logo após, foi feito o gráfico de linha, de autocorrelação e autocorrelação parcial, correlação e
correlação parcial respectivamente:
3.5

2.5

1.5
4

2
txc

1998m1 2000m1 2002m1 2004m1 2006m1 2008m1 2010m1 2012m1


mês
-1 0 1 -1 0 1
LAG AC PAC Q Prob>Q [Autocorrelation] [Partial Autocor]

1 0.9629 0.9685 149.31 0.0000


2 0.9366 0.1339 291.46 0.0000
3 0.8927 -0.2603 421.43 0.0000
4 0.8481 -0.0922 539.51 0.0000
5 0.8002 0.0074 645.3 0.0000
6 0.7543 -0.0051 739.93 0.0000
7 0.7099 0.0551 824.31 0.0000
8 0.6839 0.3199 903.13 0.0000
9 0.6549 -0.0186 975.91 0.0000
10 0.6360 -0.0496 1045 0.0000
11 0.6162 -0.0116 1110.3 0.0000
12 0.5968 -0.0878 1172 0.0000
13 0.5773 -0.0702 1230.1 0.0000
14 0.5596 0.1154 1285.1 0.0000
15 0.5336 -0.0330 1335.4 0.0000
16 0.5118 -0.0148 1382 0.0000
17 0.4772 -0.1250 1422.9 0.0000
18 0.4459 -0.0382 1458.8 0.0000
19 0.4125 -0.0162 1489.7 0.0000
20 0.3792 -0.0030 1516 0.0000
21 0.3406 -0.1133 1537.5 0.0000
22 0.3055 -0.0257 1554.8 0.0000
23 0.2649 -0.0417 1567.9 0.0000
24 0.2255 -0.1654 1577.5 0.0000
25 0.1847 -0.0331 1584 0.0000
26 0.1441 0.0053 1588 0.0000
27 0.1079 0.0616 1590.2 0.0000
28 0.0741 0.0228 1591.3 0.0000
29 0.0441 0.0473 1591.7 0.0000
30 0.0164 -0.1145 1591.7 0.0000
31 -0.0079 -0.0758 1591.8 0.0000
32 -0.0235 0.1422 1591.9 0.0000
33 -0.0402 -0.0092 1592.2 0.0000
34 -0.0592 -0.1356 1592.9 0.0000
35 -0.0806 -0.0669 1594.2 0.0000
36 -0.1027 -0.0676 1596.4 0.0000
37 -0.1220 0.0416 1599.5 0.0000
38 -0.1456 0.0353 1604 0.0000
39 -0.1653 0.1473 1609.8 0.0000
40 -0.1862 0.0156 1617.2 0.0000

.
Posteriormente foi feito o Modelo ARIMA:

-arima txc, arima(1,0,0):


ARIMA regression

Sample: 1999m1 - 2012m2 Number of obs = 158


Wald chi2(1) = 2231.23
Log likelihood = 90.42906 Prob > chi2 = 0.0000

OPG
txc Coef. Std. Err. z P>|z| [95% Conf. Interval]

txc
_cons 2.116314 .4396405 4.81 0.000 1.254634 2.977993

ARMA
ar
L1. .9637404 .0204027 47.24 0.000 .9237518 1.003729

/sigma .1353846 .0033282 40.68 0.000 .1288615 .1419077

Note: The test of the variance against zero is one sided, and the two-sided
confidence interval is truncated at zero.

. estat ic

Akaike's information criterion and Bayesian information criterion

Model N ll(null) ll(model) df AIC BIC

. 158 . 90.42906 3 -174.8581 -165.6703

Note: BIC uses N = number of observations. See [R] BIC note.

arima txc, arima(3,0,0):


ARIMA regression

Sample: 1999m1 - 2012m2 Number of obs = 158


Wald chi2(3) = 3133.81
Log likelihood = 97.42194 Prob > chi2 = 0.0000

OPG
txc Coef. Std. Err. z P>|z| [95% Conf. Interval]

txc
_cons 2.138261 .3740157 5.72 0.000 1.405204 2.871319

ARMA
ar
L1. .8685926 .0435986 19.92 0.000 .7831408 .9540443
L2. .3580502 .0633495 5.65 0.000 .2338875 .482213
L3. -.2657033 .0650416 -4.09 0.000 -.3931825 -.1382241

/sigma .1294116 .0044395 29.15 0.000 .1207103 .1381129

Note: The test of the variance against zero is one sided, and the two-sided
confidence interval is truncated at zero.

. estat ic

Akaike's information criterion and Bayesian information criterion

Model N ll(null) ll(model) df AIC BIC

. 158 . 97.42194 5 -184.8439 -169.5309

Note: BIC uses N = number of observations. See [R] BIC note.

Arima txt, arima (8,0,0)


ARIMA regression

Sample: 1999m1 - 2012m2 Number of obs = 158


Wald chi2(8) = 3947.89
Log likelihood = 106.4433 Prob > chi2 = 0.0000

OPG
txc Coef. Std. Err. z P>|z| [95% Conf. Interval]

txc
_cons 2.082253 .480886 4.33 0.000 1.139734 3.024772

ARMA
ar
L1. .8281826 .0445721 18.58 0.000 .7408228 .9155424
L2. .4178133 .0758289 5.51 0.000 .2691913 .5664352
L3. -.1881531 .1264417 -1.49 0.137 -.4359743 .059668
L4. -.0658163 .0967594 -0.68 0.496 -.2554613 .1238287
L5. .0609689 .1024064 0.60 0.552 -.1397439 .2616817
L6. -.1838271 .0898908 -2.05 0.041 -.3600099 -.0076442
L7. -.2197087 .0868166 -2.53 0.011 -.3898661 -.0495514
L8. .3230196 .0697797 4.63 0.000 .1862538 .4597854

/sigma .1218585 .005194 23.46 0.000 .1116785 .1320385

Note: The test of the variance against zero is one sided, and the two-sided
confidence interval is truncated at zero.

. estat ic

Akaike's information criterion and Bayesian information criterion

Model N ll(null) ll(model) df AIC BIC

. 158 . 106.4433 10 -192.8866 -162.2606

Note: BIC uses N = number of observations. See [R] BIC note.

Comparando os resultados, para AIC o modelo mais rigoroso é o ARIMA (8,0,0) e para o BIC o
modelo mais rigoroso é o ARIMA (3,0,0). O modelo ARIMA (1,0,0) não se destacou.

AULA PRÁTICA 2:

Agora é necessário fazer respectivamente os testes Dickey-Fuller e Phillips-Perron para testar a


estacionaridade da série:

DF drift:
. dfuller txc, drift regress lags(0)

Dickey-Fuller test for unit root Number of obs = 157

Z(t) has t-distribution


Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -1.521 -2.351 -1.655 -1.287

p-value for Z(t) = 0.0651

D.txc Coef. Std. Err. t P>|t| [95% Conf. Interval]

txc
L1. -.0315414 .0207326 -1.52 0.130 -.0724963 .0094136

_cons .0680108 .0471141 1.44 0.151 -.0250577 .1610793

DF trend:
. dfuller txc, trend regress lags(0)

Dickey-Fuller test for unit root Number of obs = 157

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -1.937 -4.021 -3.442 -3.142

MacKinnon approximate p-value for Z(t) = 0.6351

D.txc Coef. Std. Err. t P>|t| [95% Conf. Interval]

txc
L1. -.0430963 .0222448 -1.94 0.055 -.0870406 .000848
_trend -.0003626 .0002581 -1.40 0.162 -.0008725 .0001474
_cons .122201 .06078 2.01 0.046 .0021308 .2422712

Excluindo a tendência:
. dfuller txc, regress lags(0)

Dickey-Fuller test for unit root Number of obs = 157

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -1.521 -3.491 -2.886 -2.576

MacKinnon approximate p-value for Z(t) = 0.5229

D.txc Coef. Std. Err. t P>|t| [95% Conf. Interval]

txc
L1. -.0315414 .0207326 -1.52 0.130 -.0724963 .0094136

_cons .0680108 .0471141 1.44 0.151 -.0250577 .1610793

PP trend:
. pperron txc, trend regress

Phillips-Perron test for unit root Number of obs = 157


Newey-West lags = 4

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(rho) -7.548 -27.780 -20.928 -17.690


Z(t) -2.035 -4.021 -3.442 -3.142

MacKinnon approximate p-value for Z(t) = 0.5825

txc Coef. Std. Err. t P>|t| [95% Conf. Interval]

txc
L1. .9569037 .0222448 43.02 0.000 .9129594 1.000848
_trend -.0003626 .0002581 -1.40 0.162 -.0008725 .0001474
_cons .122201 .06078 2.01 0.046 .0021308 .2422712

PP noconstant:
. . pperron txc, noconstant regress

Phillips-Perron test for unit root Number of obs = 157


Newey-West lags = 4

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(rho) -0.406 -13.414 -7.938 -5.638


Z(t) -0.515 -2.592 -1.950 -1.614

txc Coef. Std. Err. t P>|t| [95% Conf. Interval]

txc
L1. .9975744 .0048149 207.19 0.000 .9880636 1.007085

PP excluindo a tendência:
. pperron txc, regress

Phillips-Perron test for unit root Number of obs = 157


Newey-West lags = 4

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(rho) -5.696 -19.990 -13.814 -11.076


Z(t) -1.639 -3.491 -2.886 -2.576

MacKinnon approximate p-value for Z(t) = 0.4630

txc Coef. Std. Err. t P>|t| [95% Conf. Interval]

txc
L1. .9684586 .0207326 46.71 0.000 .9275037 1.009414

_cons .0680108 .0471141 1.44 0.151 -.0250577 .1610793


Todos os testes inferiram que a série é não estacionária (não rejeitaram a hipótese nula).

Para transformar a série em questão em estacionária fiz a primeira diferença no Excel e a


chamei de “dtxc”:

No STATA, repetimos os testes de DF e PP:


. dfuller dtxc, noconstant regress lags(0)

Dickey-Fuller test for unit root Number of obs = 156

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -14.460 -2.593 -1.950 -1.614

D.dtxc Coef. Std. Err. t P>|t| [95% Conf. Interval]

dtxc
L1. -1.147616 .0793659 -14.46 0.000 -1.304394 -.9908375

. dfuller dtxc, drift regress lags(0)

Dickey-Fuller test for unit root Number of obs = 156

Z(t) has t-distribution


Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -14.417 -2.351 -1.655 -1.287

p-value for Z(t) = 0.0000

D.dtxc Coef. Std. Err. t P>|t| [95% Conf. Interval]

dtxc
L1. -1.147818 .0796149 -14.42 0.000 -1.305096 -.9905395

_cons -.002471 .0109222 -0.23 0.821 -.0240477 .0191057

. dfuller dtxc, drift regress lags(1)

Augmented Dickey-Fuller test for unit root Number of obs = 155

Z(t) has t-distribution


Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -7.328 -2.351 -1.655 -1.287

p-value for Z(t) = 0.0000

D.dtxc Coef. Std. Err. t P>|t| [95% Conf. Interval]

dtxc
L1. -.8579961 .1170779 -7.33 0.000 -1.089306 -.626686
LD. -.2441947 .0772888 -3.16 0.002 -.3968938 -.0914957

_cons -.0001179 .0104834 -0.01 0.991 -.0208299 .020594

.
PP:

. pperron dtxc, noconstant regress

Phillips-Perron test for unit root Number of obs = 156


Newey-West lags = 4

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(rho) -210.601 -13.412 -7.937 -5.637


Z(t) -14.309 -2.593 -1.950 -1.614

dtxc Coef. Std. Err. t P>|t| [95% Conf. Interval]

dtxc
L1. -.1476158 .0793659 -1.86 0.065 -.3043942 .0091625

. pperron dtxc, regress

Phillips-Perron test for unit root Number of obs = 156


Newey-West lags = 4

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(rho) -210.690 -19.987 -13.812 -11.075


Z(t) -14.273 -3.491 -2.886 -2.576

MacKinnon approximate p-value for Z(t) = 0.0000

dtxc Coef. Std. Err. t P>|t| [95% Conf. Interval]

dtxc
L1. -.1478178 .0796149 -1.86 0.065 -.3050961 .0094605

_cons -.002471 .0109222 -0.23 0.821 -.0240477 .0191057

. pperron dtxc, trend regress

Phillips-Perron test for unit root Number of obs = 156


Newey-West lags = 4

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(rho) -210.248 -27.773 -20.924 -17.687


Z(t) -14.271 -4.021 -3.443 -3.143

MacKinnon approximate p-value for Z(t) = 0.0000

dtxc Coef. Std. Err. t P>|t| [95% Conf. Interval]

dtxc
L1. -.1513287 .0798511 -1.90 0.060 -.3090818 .0064243
_trend -.0001872 .0002432 -0.77 0.443 -.0006677 .0002934
_cons .0122156 .0219989 0.56 0.580 -.0312453 .0556764
-.5
.5

dtxc
1

0
Além disso, para a nova variável foram feitos os mesmos gráficos:

1998m1 2000m1 2002m1 2004m1 2006m1 2008m1 2010m1 2012m1


mês
. corrgram dtxc

-1 0 1 -1 0 1
LAG AC PAC Q Prob>Q [Autocorrelation] [Partial Autocor]

1 -0.1478 -0.1478 3.4948 0.0616


2 0.2579 0.2442 14.203 0.0008
3 -0.0039 0.0680 14.205 0.0026
4 0.0317 -0.0339 14.369 0.0062
5 0.0012 -0.0192 14.369 0.0134
6 -0.0658 -0.0791 15.086 0.0196
7 -0.2668 -0.3334 26.932 0.0003
8 0.0420 0.0076 27.228 0.0006
9 -0.1436 0.0378 30.707 0.0003
10 0.0100 -0.0013 30.725 0.0007
11 -0.0059 0.0732 30.731 0.0012
12 0.0056 0.0538 30.736 0.0022
13 -0.0260 -0.1307 30.853 0.0035
14 0.1219 0.0185 33.447 0.0025
15 -0.0501 0.0006 33.888 0.0035
16 0.1884 0.1080 40.174 0.0007
17 -0.0534 0.0180 40.684 0.0010
18 0.0410 -0.0040 40.986 0.0015
19 0.0026 -0.0170 40.987 0.0024
20 0.0874 0.0911 42.378 0.0025
21 -0.0428 0.0014 42.715 0.0034
22 0.0689 0.0159 43.594 0.0040
23 -0.0093 0.1335 43.61 0.0059
24 0.0278 -0.0034 43.755 0.0081
25 0.0117 -0.0403 43.78 0.0115
26 -0.0788 -0.0934 44.965 0.0119
27 -0.0331 -0.0513 45.176 0.0156
28 -0.0442 -0.0722 45.553 0.0194
29 -0.0316 0.0869 45.748 0.0249
30 -0.0234 0.0456 45.856 0.0321
31 -0.1227 -0.1677 48.836 0.0218
32 0.0381 -0.0136 49.126 0.0270
33 0.0402 0.1090 49.451 0.0328
34 0.0563 0.0371 50.095 0.0370
35 0.0185 0.0356 50.165 0.0466
36 -0.0238 -0.0718 50.282 0.0573
37 0.0484 -0.0631 50.77 0.0653
38 -0.0579 -0.1690 51.472 0.0711
39 0.0201 -0.0337 51.558 0.0859
40 -0.1305 -0.1111 55.19 0.0555

.
ARIMA (1,1,1):
ARIMA regression

Sample: 1999m2 - 2012m2 Number of obs = 157


Wald chi2(2) = 34.98
Log likelihood = 93.46134 Prob > chi2 = 0.0000

OPG
D.txc Coef. Std. Err. z P>|z| [95% Conf. Interval]

txc
_cons -.0018679 .0109663 -0.17 0.865 -.0233615 .0196256

ARMA
ar
L1. -.7451211 .1961867 -3.80 0.000 -1.12964 -.3606023

ma
L1. .5945923 .2005321 2.97 0.003 .2015566 .9876279

/sigma .1333898 .0043264 30.83 0.000 .1249101 .1418694

Note: The test of the variance against zero is one sided, and the two-sided
confidence interval is truncated at zero.

. estat ic

Akaike's information criterion and Bayesian information criterion

Model N ll(null) ll(model) df AIC BIC

. 157 . 93.46134 4 -178.9227 -166.6977

Note: BIC uses N = number of observations. See [R] BIC note.

ARIMA (1,1,0):
ARIMA regression

Sample: 1999m2 - 2012m2 Number of obs = 157


Wald chi2(1) = 13.59
Log likelihood = 91.30889 Prob > chi2 = 0.0002

OPG
D.txc Coef. Std. Err. z P>|z| [95% Conf. Interval]

txc
_cons -.0017609 .0108849 -0.16 0.871 -.0230949 .0195732

ARMA
ar
L1. -.1471757 .0399191 -3.69 0.000 -.2254157 -.0689357

/sigma .1352563 .003601 37.56 0.000 .1281985 .1423141

Note: The test of the variance against zero is one sided, and the two-sided
confidence interval is truncated at zero.

. estat ic

Akaike's information criterion and Bayesian information criterion

Model N ll(null) ll(model) df AIC BIC

. 157 . 91.30889 3 -176.6178 -167.449

Note: BIC uses N = number of observations. See [R] BIC note.

ARIMA (2,1,1):
ARIMA regression

Sample: 1999m2 - 2012m2 Number of obs = 157


Wald chi2(3) = 55.46
Log likelihood = 96.51085 Prob > chi2 = 0.0000

OPG
D.txc Coef. Std. Err. z P>|z| [95% Conf. Interval]

txc
_cons -.0027948 .0155862 -0.18 0.858 -.0333432 .0277535

ARMA
ar
L1. .0642285 .3359015 0.19 0.848 -.5941264 .7225834
L2. .2795248 .0456697 6.12 0.000 .1900138 .3690358

ma
L1. -.1880438 .3285774 -0.57 0.567 -.8320437 .4559562

/sigma .1307873 .0041788 31.30 0.000 .1225971 .1389775

Note: The test of the variance against zero is one sided, and the two-sided
confidence interval is truncated at zero.

. estat ic

Akaike's information criterion and Bayesian information criterion

Model N ll(null) ll(model) df AIC BIC

. 157 . 96.51085 5 -183.0217 -167.7405

Note: BIC uses N = number of observations. See [R] BIC note.

ARIMA (3,1,3):
ARIMA regression

Sample: 1999m2 - 2012m2 Number of obs = 157


Wald chi2(6) = 213.34
Log likelihood = 99.2562 Prob > chi2 = 0.0000

OPG
D.txc Coef. Std. Err. z P>|z| [95% Conf. Interval]

txc
_cons -.0027751 .015726 -0.18 0.860 -.0335974 .0280473

ARMA
ar
L1. -.4873317 .5773176 -0.84 0.399 -1.618854 .6441901
L2. -.1529735 .5281201 -0.29 0.772 -1.18807 .8821228
L3. .4655568 .4405551 1.06 0.291 -.3979154 1.329029

ma
L1. .4198356 .5736354 0.73 0.464 -.7044691 1.54414
L2. .3902986 .4930995 0.79 0.429 -.5761587 1.356756
L3. -.4302484 .5265828 -0.82 0.414 -1.462332 .6018349

/sigma .1282452 .0053056 24.17 0.000 .1178464 .1386439

Note: The test of the variance against zero is one sided, and the two-sided
confidence interval is truncated at zero.

. estat ic

Akaike's information criterion and Bayesian information criterion

Model N ll(null) ll(model) df AIC BIC

. 157 . 99.2562 8 -182.5124 -158.0624

Note: BIC uses N = number of observations. See [R] BIC note.

Dentre os modelos gerados, o Modelo ARIMA (2,1,1) apresentou menor AIC e menor BIC, por
isso é o modelo mais rigoroso.

AULA PRÁTICA 3:

Na série temporal analisada, observando os gráficos não é possível ver claramente a presença
de sazonalidade. Ainda, foi feito o modelo SARIMA para observação:

ARIMA (1,0,0) SARIMA (1,1,1,12):


ARIMA regression

Sample: 2000m2 - 2012m2 Number of obs = 145


Wald chi2(2) = 9.52
Log likelihood = 69.71904 Prob > chi2 = 0.0086

OPG
S12.dtxc Coef. Std. Err. z P>|z| [95% Conf. Interval]

dtxc
_cons -.0022419 .0031466 -0.71 0.476 -.0084091 .0039252

ARMA
ar
L1. -.1473183 .047902 -3.08 0.002 -.2412045 -.0534321

ARMA12
ar
L1. -.0066216 .078249 -0.08 0.933 -.1599868 .1467437

ma
L1. -1 . . . . .

/sigma .1344269 .0046242 29.07 0.000 .1253637 .1434902

Note: The test of the variance against zero is one sided, and the two-sided
confidence interval is truncated at zero.

. estat ic

Akaike's information criterion and Bayesian information criterion

Model N ll(null) ll(model) df AIC BIC

. 145 . 69.71904 4 -131.4381 -119.5311

Note: BIC uses N = number of observations. See [R] BIC note.

ARIMA (1,0,0) SARIMA (1,0,0,12):


ARIMA regression

Sample: 1999m2 - 2012m2 Number of obs = 157


Wald chi2(2) = 13.60
Log likelihood = 91.30896 Prob > chi2 = 0.0011

OPG
dtxc Coef. Std. Err. z P>|z| [95% Conf. Interval]

dtxc
_cons -.0017693 .0112294 -0.16 0.875 -.0237785 .0202398

ARMA
ar
L1. -.1472017 .0399732 -3.68 0.000 -.2255478 -.0688556

ARMA12
ar
L1. .0009425 .1211712 0.01 0.994 -.2365487 .2384337

/sigma .1352534 .0039669 34.10 0.000 .1274785 .1430283

Note: The test of the variance against zero is one sided, and the two-sided
confidence interval is truncated at zero.

. estat ic

Akaike's information criterion and Bayesian information criterion

Model N ll(null) ll(model) df AIC BIC

. 157 . 91.30896 4 -174.6179 -162.3929

Note: BIC uses N = number of observations. See [R] BIC note.

Comparando os testes, pode-se concluir que o modelo SARIMA (1,0,0,12) possui menor AIC e
menor BIC sendo então o modelo mais rigoroso.

AULA PRÁTICA 4:

-arima txc in 1/144, arima(1,0,0)


ARIMA regression

Sample: 1999m1 - 2010m12 Number of obs = 144


Wald chi2(1) = 1723.58
Log likelihood = 79.13088 Prob > chi2 = 0.0000

OPG
txc Coef. Std. Err. z P>|z| [95% Conf. Interval]

txc
_cons 2.144441 .4779337 4.49 0.000 1.207708 3.081174

ARMA
ar
L1. .9627033 .0231887 41.52 0.000 .9172543 1.008152

/sigma .1384098 .0035673 38.80 0.000 .131418 .1454016

Note: The test of the variance against zero is one sided, and the two-sided
confidence interval is truncated at zero.
-arima txc in 1/144, arima(3,0,0)

ARIMA regression

Sample: 1999m1 - 2010m12 Number of obs = 144


Wald chi2(3) = 2509.48
Log likelihood = 86.01521 Prob > chi2 = 0.0000

OPG
txc Coef. Std. Err. z P>|z| [95% Conf. Interval]

txc
_cons 2.181942 .3812766 5.72 0.000 1.434654 2.929231

ARMA
ar
L1. .8765272 .0457577 19.16 0.000 .7868437 .9662107
L2. .3644282 .0660851 5.51 0.000 .2349037 .4939526
L3. -.282927 .0674472 -4.19 0.000 -.4151211 -.150733

/sigma .1318289 .0047553 27.72 0.000 .1225088 .141149

Note: The test of the variance against zero is one sided, and the two-sided
confidence interval is truncated at zero.

-arima txc in 1/144, arima(8,0,0):


ARIMA regression

Sample: 1999m1 - 2010m12 Number of obs = 144


Wald chi2(8) = 3317.10
Log likelihood = 95.04798 Prob > chi2 = 0.0000

OPG
txc Coef. Std. Err. z P>|z| [95% Conf. Interval]

txc
_cons 2.140746 .4651343 4.60 0.000 1.2291 3.052393

ARMA
ar
L1. .8369126 .046193 18.12 0.000 .7463761 .9274492
L2. .4230288 .0780712 5.42 0.000 .270012 .5760456
L3. -.2253225 .1302933 -1.73 0.084 -.4806927 .0300476
L4. -.0423858 .0998222 -0.42 0.671 -.2380337 .1532621
L5. .088244 .1080331 0.82 0.414 -.1234969 .2999849
L6. -.2112486 .094412 -2.24 0.025 -.3962927 -.0262045
L7. -.2327064 .0919422 -2.53 0.011 -.4129098 -.0525031
L8. .3330829 .0735333 4.53 0.000 .1889604 .4772055

/sigma .1233838 .0054628 22.59 0.000 .1126769 .1340906

Note: The test of the variance against zero is one sided, and the two-sided
confidence interval is truncated at zero.
E foi feito a previsão “one-step prediction” para os três modelos estimados respectivamente:

mês txc dtxc ftxc AR(1) ftxc AR (3) ftxc AR(8)


2010m10 1.7 .01 1,706949 1,716353 1,734926
2010m11 1.72 .02 1,716576 1,699608 1,696244
2010m12 1.67 -.05 1,735830 1,740588 1,696082
2011m1 1.67 0 1,687695 1,701221 1,706493
2011m2 1.66 -.01 1,6876950 1,677341 1,676880
2011m3 1.63 -.03 1,6780680 1,682722 1,681276
2011m4 1.57 -.06 1,6491870 1,652782 1,670000
2011m5 1.58 .01 1,5914250 1,592086 1,575067
2011m6 1.56 -.02 1,6010520 1,587474 1,574477
2011m7 1.56 0 1,5817980 1,590563 1,594175
2011m8 1.59 .03 1,5817980 1,580445 1,568815
2011m9 1.85 .26 1,6106790 1,612400 1,601375
2011m10 1.69 -.16 1,8609820 1,851230 1,849719
2011m11 1.82 .13 1,7069490 1,797249 1,819133
2011m12 1.88 .06 1,8321010 1,779328 1,782304
2012m1 1.74 -.14 1,8898630 1,924563 1,923177
2012m2 1.71 -.03 1,7550840 1,786935 1,818825

Logo após foi feito o erro absoluto percentual de cada modelo estimado e sua média:

Obs: os valores encontrados são diferentes dos da aula prática 4 porque foram usados valores
arredondados da taxa de câmbio.
mês txc dtxc ftxc AR(1) ftxc AR (3) ftxc AR(8) EAP AR1 EAP AR3 EAP AR8
2010m10 1,7 .01 1,706949 1,716353 1,734926 0,408765 0,961941 2,054471
2010m11 1,72 .02 1,716576 1,699608 1,696244 0,19907 1,185581 1,381163
2010m12 1,67 -.05 1,735830 1,740588 1,696082 3,941916 4,226826 1,561796
2011m1 1,67 0 1,687695 1,701221 1,706493 1,059581 1,869521 2,18521
2011m2 1,66 -.01 1,6876950 1,677341 1,676880 1,668373 1,044639 1,016867
2011m3 1,63 -.03 1,6780680 1,682722 1,681276 2,948957 3,234479 3,145767
2011m4 1,57 -.06 1,6491870 1,652782 1,670000 5,043758 5,272739 6,369427
2011m5 1,58 .01 1,5914250 1,592086 1,575067 0,723101 0,764937 0,312215
2011m6 1,56 -.02 1,6010520 1,587474 1,574477 2,631538 1,761154 0,928013
2011m7 1,56 0 1,5817980 1,590563 1,594175 1,397308 1,959167 2,190705
2011m8 1,59 .03 1,5817980 1,580445 1,568815 0,515849 0,600943 1,33239
2011m9 1,85 .26 1,6106790 1,612400 1,601375 12,93627 12,84324 13,43919
2011m10 1,69 -.16 1,8609820 1,851230 1,849719 10,11728 9,540237 9,450828
2011m11 1,82 .13 1,7069490 1,797249 1,819133 6,211593 1,250055 0,047637
2011m12 1,88 .06 1,8321010 1,779328 1,782304 2,547819 5,354894 5,196596
2012m1 1,74 -.14 1,8898630 1,924563 1,923177 8,612816 10,60707 10,52741
2012m2 1,71 -.03 1,7550840 1,786935 1,818825 2,636491 4,499123 6,364035
SOMA 63,60048 66,97655 67,50372
MAPE 3,741205 3,939797 3,970807

Logo, o melhor modelo a ser utilizado é aquele que tem menor MAPE, modelo ARIMA (1,0,0).
A partir de então usaremos o modelo ARIMA (1,0,0):
ARIMA regression

Sample: 1999m1 - 2012m2 Number of obs = 158


Wald chi2(1) = 2231.23
Log likelihood = 90.42906 Prob > chi2 = 0.0000

OPG
txc Coef. Std. Err. z P>|z| [95% Conf. Interval]

txc
_cons 2.116314 .4396405 4.81 0.000 1.254634 2.977993

ARMA
ar
L1. .9637404 .0204027 47.24 0.000 .9237518 1.003729

/sigma .1353846 .0033282 40.68 0.000 .1288615 .1419077

Note: The test of the variance against zero is one sided, and the two-sided
confidence interval is truncated at zero.

Adicionei mais 10 meses na série (até o final de 2012) e pedi para o software fazer a previsão:

*(1 variable, 168 observations pasted into data editor)

. predict ftxc12, y

Agora fazendo com o modelo escolhido por minimiza AIC e BIC:

ARIMA (2,1,1)
ARIMA regression

Sample: 1999m2 - 2012m2 Number of obs = 157


Wald chi2(3) = 55.46
Log likelihood = 96.51085 Prob > chi2 = 0.0000

OPG
D.txc Coef. Std. Err. z P>|z| [95% Conf. Interval]

txc
_cons -.0027948 .0155862 -0.18 0.858 -.0333432 .0277535

ARMA
ar
L1. .0642285 .3359015 0.19 0.848 -.5941264 .7225834
L2. .2795248 .0456697 6.12 0.000 .1900138 .3690358

ma
L1. -.1880438 .3285774 -0.57 0.567 -.8320437 .4559562

/sigma .1307873 .0041788 31.30 0.000 .1225971 .1389775

Note: The test of the variance against zero is one sided, and the two-sided
confidence interval is truncated at zero.

Gerando a previsão:

A PARTIR DA AULA PRÁTICA 5 NÃO É POSSÍVEL FAZER OS EXEMPLOS APENAS COM UMA
VARIÁVEL.

Você também pode gostar