You are on page 1of 7

Autocorrelao

Econometria (R. Carter Hill; William Griffiths; George


Judge)
12.1)
Considere a funo investimento
It = 1 + 2Yt + 3Rt + et
Em que:
I = Investimento
Y = PIB
R = Taxa de juros
Utilize o arquivo INV.WFL para estimar a equao apresentada.
a) Ache as estimativas de mnimos quadrados de mnimos quadrados para
b1, b2 e b3 e comente os resultados. Os coeficientes b2 e b3 possuem os
resultados esperados?

Dependent Variable: I
Method: Least Squares
Date: 10/01/16 Time: 08:51
Sample: 1 30
Included observations: 30
Variable

Coefficient

Std. Error

t-Statistic

Prob.

C
Y
R

6.224938
0.769911
-0.184196

2.510894
0.071791
0.126416

2.479172
10.72442
-1.457068

0.0197
0.0000
0.1566

R-squared
Adjusted R-squared
S.E. of regression
Sum squared resid
Log likelihood
F-statistic
Prob(F-statistic)

0.816282
0.802673
3.329642
299.3358
-77.07369
59.98221
0.000000

Mean dependent var


S.D. dependent var
Akaike info criterion
Schwarz criterion
Hannan-Quinn criter.
Durbin-Watson stat

20.22200
7.495569
5.338246
5.478366
5.383071
0.852153

b) Faa o grfico dos resduos. O resultado sugere que h autocorrelao?

No eviews, na janela do modelo, resids


35
30
25
20
15

10

2
0
-2
-4
-6
-8
2

10

12

Residual

14

16

18

20

22

Actual

24

26

28

30

Fitted

O resduo est apresentando um comportamento muito parecido com o Actual,


o que no pode acontecer, para que os testes no sejam prejudicados. Era
esperado que o resduo se comportasse com algo de maior frequncia.

c) Aplique o teste de Durbin-Watson para verificar a existncia de


autocorrelao. Os valores crticos so: dL=1,284 e dU=1,567
No View, residual diagnostics, Serial correlation LM test [a escolha de lag = 2
arbitrria].
Dai no eviews, quando feito o diagnstico de resduos,
Breusch-Godfrey Serial Correlation LM Test:
F-statistic
Obs*R-squared

6.764643
10.53429

Prob. F(2,25)
Prob. Chi-Square(2)

0.0045
0.0052

Test Equation:
Dependent Variable: RESID
Method: Least Squares
Date: 10/01/16 Time: 08:56
Sample: 1 30
Included observations: 30
Presample missing value lagged residuals set to zero.
Variable

Coefficient

Std. Error

t-Statistic

Prob.

C
Y

1.799886
-0.012173

2.202606
0.060373

0.817162
-0.201637

0.4216
0.8418

R
RESID(-1)
RESID(-2)
R-squared
Adjusted R-squared
S.E. of regression
Sum squared resid
Log likelihood
F-statistic
Prob(F-statistic)

-0.107141
0.697416
-0.165681
0.351143
0.247326
2.787301
194.2262
-70.58555
3.382321
0.024177

0.112469
0.208636
0.204936

-0.952623
3.342738
-0.808452

Mean dependent var


S.D. dependent var
Akaike info criterion
Schwarz criterion
Hannan-Quinn criter.
Durbin-Watson stat

0.3499
0.0026
0.4265
-2.35E-15
3.212775
5.039036
5.272569
5.113746
1.868584

Teste Breusch-Godfrey
H:0 -> no tem autocorrelao entre os resduos, logo (coeficientes de RESID (-1)
e RESID (-2) conjuntamente so iguais a zero);
H:1 -> tem autocorrelao, pelo menos um dos coeficientes diferente de zero
conjuntamente.
O valor F calculado de 6,76 com p-valor muito pequeno (<<1%), logo, existe
evidencia estatstica de autocorrelao entre os resduos, dessa forma, evidncia
de impacto no modelo.

Como fazer na mo
Rodar modelo, criar srie de resduos.
Roda esse modelo: >>> resid01 c y r resid01(-1) resid01(-2)

Dependent Variable: RESID01


Method: Least Squares
Date: 10/01/16 Time: 09:03
Sample (adjusted): 3 30
Included observations: 28 after adjustments
Variable

Coefficient

Std. Error

t-Statistic

Prob.

C
Y
R
RESID01(-1)
RESID01(-2)

1.820885
-0.002345
-0.127743
0.716243
-0.178517

2.425018
0.067168
0.118703
0.219487
0.212598

0.750875
-0.034910
-1.076159
3.263266
-0.839690

0.4603
0.9725
0.2930
0.0034
0.4097

R-squared
Adjusted R-squared
S.E. of regression
Sum squared resid
Log likelihood
F-statistic
Prob(F-statistic)

0.361424
0.250368
2.856312
187.6459
-66.36321
3.254416
0.029668

Mean dependent var


S.D. dependent var
Akaike info criterion
Schwarz criterion
Hannan-Quinn criter.
Durbin-Watson stat

-0.108571
3.298994
5.097372
5.335266
5.170098
1.879764

Fazer um teste F para testar a significncia dos coeficientes dos resduos


conjuntamente. No vamos demonstrar isso aqui, copia do output automtico.

d) Reestime o modelo aps corrigi-lo por autocorrelao e relate os


resultados. H diferenas entre os resultados?
Para reestimar o modelo evitando o problema de autocorrelao:
Janela de estimate, aba options, covariance method HAC (Newye-West).
Dependent Variable: I
Method: Least Squares
Date: 10/01/16 Time: 09:21
Sample: 1 30
Included observations: 30
HAC standard errors & covariance (Bartlett kernel, Newey-West fixed
bandwidth = 4.0000)
Variable

Coefficient

Std. Error

t-Statistic

Prob.

C
Y
R

6.224938
0.769911
-0.184196

2.124542
0.077516
0.121236

2.930014
9.932311
-1.519318

0.0068
0.0000
0.1403

R-squared
Adjusted R-squared
S.E. of regression
Sum squared resid
Log likelihood
F-statistic
Prob(F-statistic)
Prob(Wald F-statistic)

0.816282
0.802673
3.329642
299.3358
-77.07369
59.98221
0.000000
0.000000

Mean dependent var


S.D. dependent var
Akaike info criterion
Schwarz criterion
Hannan-Quinn criter.
Durbin-Watson stat
Wald F-statistic

20.22200
7.495569
5.338246
5.478366
5.383071
0.852153
57.35421

e) Qual o nvel de investimento do prximo ano dado que R=14 e Y=36? Faa
a projeo com o modelo com e sem ajuste para autocorrelao e
compare os resultados.
I = 6,2249 + 0,76*36 0,1841*14 = X valor na calculadora

12.6)
O arquivo ICECR.WFL possui variveis potencialmente importantes para modelar
a demanda por sorvete. As variveis so:
Q = consumo de sorvete per capita

P = preo do sorvete
I = renda familiar
F: temperatura mdia
Considerando estas informaes:
a) Estime o seguinte modelo:
Qt = 1 + 2Pt + 3It + 4Ft + et
Dependent Variable: Q
Method: Least Squares
Date: 10/01/16 Time: 16:28
Sample: 1 30
Included observations: 30
Variable

Coefficient

Std. Error

t-Statistic

Prob.

C
P
I
F

0.197315
-1.044414
0.003308
0.003458

0.270216
0.834357
0.001171
0.000446

0.730212
-1.251759
2.823722
7.762213

0.4718
0.2218
0.0090
0.0000

R-squared
Adjusted R-squared
S.E. of regression
Sum squared resid
Log likelihood
F-statistic
Prob(F-statistic)

0.718994
0.686570
0.036833
0.035273
58.61944
22.17489
0.000000

Mean dependent var


S.D. dependent var
Akaike info criterion
Schwarz criterion
Hannan-Quinn criter.
Durbin-Watson stat

0.359433
0.065791
-3.641296
-3.454469
-3.581528
1.021170

b) Quais coeficientes no so estatisticamente diferentes de zero? Estas


variveis so significantes para explicar a demanda por sorvete?
O intercepto e o P no so estatisticamente significantes ao nvel de 5% de
confiana. O fato do preo no ter efeito direto sobre a demanda do preo
contra intuitivo, todavia, possa existir uma demanda que no to elstica ao
preo.

c) H evidencia de autocorrelao dos resduos? Faa o teste de DurbinWatson e multiplicador de Lagrange. Os valores crticos so: d L=1,214 e
dU=1,650.
O teste de Durbin-Watson no aplicvel nesse exerccio, sendo adotado como proxy o valor do teste BreuschGodfrey.
Breusch-Godfrey Serial Correlation LM Test:
F-statistic
Obs*R-squared

2.110591
4.487249

Prob. F(2,24)
Prob. Chi-Square(2)

0.1431
0.1061

Test Equation:
Dependent Variable: RESID
Method: Least Squares
Date: 10/01/16 Time: 16:31
Sample: 1 30
Included observations: 30
Presample missing value lagged residuals set to zero.
Variable

Coefficient

Std. Error

t-Statistic

Prob.

C
P
I
F
RESID(-1)
RESID(-2)

0.048078
-0.164820
2.80E-05
-8.48E-05
0.467604
-0.127675

0.262663
0.805036
0.001164
0.000503
0.229323
0.263176

0.183041
-0.204736
0.024051
-0.168684
2.039059
-0.485130

0.8563
0.8395
0.9810
0.8675
0.0526
0.6320

R-squared
Adjusted R-squared
S.E. of regression
Sum squared resid
Log likelihood
F-statistic
Prob(F-statistic)

0.149575
-0.027597
0.035354
0.029997
61.04972
0.844236
0.531897

Mean dependent var


S.D. dependent var
Akaike info criterion
Schwarz criterion
Hannan-Quinn criter.
Durbin-Watson stat

-1.05E-16
0.034876
-3.669981
-3.389742
-3.580330
1.627763

d) Reestime o modelo aps corrigir as variveis em relao autocorrelao


Para reestimar o modelo evitando o problema de autocorrelao: Janela de
estimate, aba options, covariance method HAC (Newye-West).
Dependent Variable: Q
Method: Least Squares
Date: 10/01/16 Time: 16:33
Sample: 1 30
Included observations: 30
HAC standard errors & covariance (Bartlett kernel, Newey-West fixed
bandwidth = 4.0000)
Variable

Coefficient

Std. Error

t-Statistic

Prob.

C
P
I
F

0.197315
-1.044414
0.003308
0.003458

0.337811
0.977249
0.001328
0.000400

0.584099
-1.068728
2.491080
8.640830

0.5642
0.2950
0.0194
0.0000

R-squared
Adjusted R-squared
S.E. of regression
Sum squared resid
Log likelihood
F-statistic
Prob(F-statistic)
Prob(Wald F-statistic)

0.718994
0.686570
0.036833
0.035273
58.61944
22.17489
0.000000
0.000000

Mean dependent var


S.D. dependent var
Akaike info criterion
Schwarz criterion
Hannan-Quinn criter.
Durbin-Watson stat
Wald F-statistic

0.359433
0.065791
-3.641296
-3.454469
-3.581528
1.021170
27.63410

e) Os resultados da parte (d) so diferentes da parte (b)?


Nenhum dos indicadores difere significativamente, indicando que o problema de
autocorrelao no atrapalhou a interpretao do modelo.

Como testar se o modelo tem ajuste:


- Problema de especificao forma: teste RESET; corrige com proxy, usar outras
forma log, quadrtica, etc..
- Problema de heterocedasticidade: teste de White; corrige com White.
- Problema de autocorrelao: Breusch-Godfrey, corrige com HAC (Newye-West).