Está en la página 1de 16

MODELO DE REGRESIN LINEAL

Consumo de ame, su precio y precio de la yuca


Obs.
1
2
3
4
5
6
7
8
9
10
11
12

Y
32
35
38
39
40
42
45
46
47
49
51
60

X1
18
16
15
14
13
12
10
9
8
7
5
5

X2
3
5
7
10
11
12
15
16
17
19
20
21

Dependent Variable: NAME


Method: Least Squares
Date: 03/31/11 Time: 14:41
Sample: 1 12
Included observations: 12
Variable

Coefficient

Std. Error

C
PRECIO
PRECIO_YUCA

58.24321
-1.498371
0.146580

28.18909 2.066161
1.382388 -1.083901
1.002122 0.146269

R-squared
0.916940
Adjusted R-squared 0.898482
S.E. of regression
2.446730
Sum squared resid
53.87839
Log likelihood
-26.03820
F-statistic
49.67756
Prob(F-statistic)
0.000014

t-Statistic

Mean dependent var


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

Prob.
0.0688
0.3066
0.8869
43.66667
7.679173
4.839700
4.960927
4.794817
1.553919

Estimation Command:
=========================
LS NAME C PRECIO_NAME PRECIO_YUCA
Estimation Equation:
=========================
NAME = C(1) + C(2)*PRECIO_NAME + C(3)*PRECIO_YUCA
Substituted Coefficients:
=========================
NAME = 58.243213898 - 1.49837133551*PRECIO_NAME + 0.14657980456*PRECIO_YUCA

MULTICOLINEALIDAD
R2= 91,69%. Un R2 alto, t no estadsticamente significativa y F estadsticamente
significativa, demuestra que existe multicolinealidad.
Probabilidad To = 0,0688 < 0,05. C es estadsticamente significativo
Probabilidad T1 = 0,3066 > 0.05. El precio del ame no es estadsticamente
significativo.
Probabilidad T2 = 0,8869 > 0,05 El precio de la yuca no es estadsticamente
significativo.

Probabilidad F = 0.00014 < 0,05.


F est> F tab (2,9)
49,67 > 5,12
Se rechaza Ho y se acepta que los verdaderos coeficientes no son
simultneamente iguales a cero.
MATRIX DE CORRELACIN
NAME

PRECIO_NAME

PRECIO_YUCA

NAME

1.000000

-0.957467

0.951891

PRECIO_NAME

-0.957467

1.000000

-0.992367

PRECIO_YUCA

0.951891

-0.992367

1.000000

r23 = -0.992367
Si el valor de r23 0,50 hay multicolinealidad. En este caso -0.992367 es menor
a 0,5 no hay multicolinealidad
Prueba FIV = 1/ (1-R232)= 1 /0,015207737 =65,75600167 > 2 segn
esta prueba hay presencia de multicolinealidad.
HETEROCEDASTICIDAD
Heteroskedasticity Test: Breusch-Pagan-Godfrey
F-statistic
Obs*R-squared
Scaled explained
SS

2.367939
4.137380

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

0.1492
0.1264

6.148588

Prob. Chi-Square(2)

0.0462

0,1492 > 0,05


0,1264> 0,05
0,0462< 0,05

Homocedasticidad
Homocedasticidad
Heterocedstica

Siguiendo la prueba F y Chi-Square(2). Se dice que es homocedstica


Heteroskedasticity Test: Harvey
F-statistic
Obs*R-squared
Scaled explained

3.457760
5.214171
18.76543

0,0769 > 0,05


0,0737> 0,05
0,0001< 0,05

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

0.0769
0.0737
0.0001

Homocedasticidad
Homocedasticidad
Heterocedstica

Heteroskedasticity Test: Glejser


F-statistic

6.051738

Prob. F(2,9)

0.0216

Obs*R-squared
Scaled explained
SS

6.882360

Prob. Chi-Square(2)

0.0320

8.674663

Prob. Chi-Square(2)

0.0131

Heteroskedasticity Test: White


F-statistic
Obs*R-squared
Scaled explained SS

1.638856
6.927534
10.29505

Prob. F(5,6)
Prob. Chi-Square(5)
Prob. Chi-Square(5)

0.2812
0.2261
0.0673

Todos los resultados son similares al test de Breusch-Pagan-Godfrey, para


decidir si existe homocedasticidad. La funcin es homocedstica

RUIDO BLANCO
PRUEBE DE JAQUE BERA
E

, )

Ho= Es normal E
Ha= No es normal

, )

Como el valor de la
probabilidad 0.002524 es menor que 0,05, es
estadsticamente significativo, y se rechaza la hiptesis nula
El comportamiento de los residuos no es normal. No hay ruido blanco

AUTOCORRELACIN
DURBIN WATSON
Dw= 2 (1-

) si

= 0 no existe autocorrelacin, con un DW = 2

DW =1.553919
= - Dw +1
2
N= 12 K=2

= - 1.553919 +1 = -0.78 +1 = 0.22


2

La correlacin es
baja

Zona de indecisin

1.553919

0.812

1.579

2.42

3.19

Zona de indecisin. No es posible determinar si existe autocorrelacin

Se corrige la autocorrelacin con correlacin serial BREUSCHGODFREY


RESIDUO = Bo +B1x+B2X2+resid (-1)

N= 12 K=3

Breusch-Godfrey Serial Correlation LM Test:


F-statistic
Obs*R-squared

3.491737
3.646172

Prob. F(1,8)
Prob. Chi-Square(1)

0.0986
0.0562

Test Equation:
Dependent Variable: RESID
Method: Least Squares
Date: 04/07/11 Time: 09:30
Sample: 1 12
Included observations: 12
Presample missing value lagged residuals set to zero.
Variable

Coefficient

Std. Error

C
PRECIO_NAME
PRECIO_YUCA
RESID(-1)

-34.42712
1.839368
1.000154
-2.318269

31.01234 -1.110111
1.570215 1.171412
1.035846 0.965543
1.240632 -1.868619

R-squared
0.303848
Adjusted R-squared 0.042791
S.E. of regression
2.165282
Sum squared resid
37.50757
Log likelihood
-23.86508
F-statistic
1.163912
Prob(F-statistic)
0.381816

t-Statistic

Mean dependent var


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

Prob.
0.2992
0.2751
0.3625
0.0986
-6.51E-15
2.213151
4.644180
4.805815
4.584337
1.215919

Y = -34.42 + 1.839X1 + 1.000X2 2.31resid(-1)


0,0562 > 0,05

No hay autocorrelacin en el modelo

Dado los problemas de multicolinealidad y no hay ruido blanco, se trabaja con


el modelo en logaritmos para mejorar el ajuste.

MODELO LOG-LOG
Ln Y =o + 1LnX1+ 2 LnX2
Y
3,47
3,56
3,64
3,66
3,69
3,74
3,81
3,83
3,85
3,89
3,93

X1
2,89
2,77
2,71
2,64
2,56
2,48
2,30
2,20
2,08
1,95
1,61

X2
1,10
1,61
1,95
2,30
2,40
2,48
2,71
2,77
2,83
2,94
3,00

4,09

1,61

3,04

Dependent Variable: LN_NAME


Method: Least Squares
Date: 04/07/11 Time: 11:19
Sample: 1 12
Included observations: 12
Variable

Coefficient

Std. Error

t-Statistic

C
4.042091
LN_PRECIO_NAME -0.241186
LN_PRECIO_YUCA 0.115035

0.223056 18.12143
0.056537 -4.265981
0.040778 2.820985

R-squared
Adjusted R-squared

0.956983
0.947424

Mean dependent var


S.D. dependent var

S.E. of regression

0.039612

Sum squared resid

0.014122

Log likelihood
F-statistic
Prob(F-statistic)

23.44224
100.1100
0.000001

Prob.
0.0000
0.0021
0.0200

3.762590
0.172757
Akaike info criterion 3.407039
Schwarz criterion
3.285813
Hannan-Quinn criter. 3.451922
Durbin-Watson stat
2.105986

Y = 4.042 0.241Ln x1 + 0.115Lnx2


MULTICOLINEALIDAD
R2= 95,69%. Un R2 alto, t estadsticamente significativa y F estadsticamente
significativa, demuestra que no existe multicolinealidad.

Probabilidad To = 0,0000 < 0,05. C es estadsticamente significativo


Probabilidad T1 = 0,0021 < 0.05. El precio del ame es estadsticamente
significativo.
Probabilidad T2 = 0,02
significativo.
Probabilidad F =

< 0,05 El precio de la yuca es estadsticamente

0.00014 < 0,05.

Se rechaza Ho y se acepta de que los verdaderos coeficientes no son


simultneamente iguales a cero.
MATRIX DE CORRELACIN

LN_NAME

LN_PRECIO_NAME

LN_PRECIO_YUCA

LN_NAME

1.000000

-0.958617

0.932738

LN_PRECIO_NAME

-0.958617

1.000000

-0.874225

LN_PRECIO_YUCA

0.932738

-0.874225

1.000000

r23 = -0.874225
Si el valor de r23 0,50 hay multicolinealidad. En este caso -0.874225 es
menor a 0,5 no hay multicolinealidad
Prueba FIV = 1/ (1-R232)= 1 / 0,236 =4.237 > 2. Segn esta prueba hay
presencia de multicolinealidad.
Las pruebas de R2, t y F sealan que no existe multicolinealidad, pero FIV
muestra que si, entonces, existe o no la multicolinealidad?

HETEROCEDASTICIDAD
Heteroskedasticity Test: Breusch-Pagan-Godfrey
F-statistic
Obs*R-squared
Scaled explained
SS

0,043 < 0,05


0,1264 > 0,05
0,0462< 0,05

10.59245
8.422052

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

0.0043
0.0148

8.941904

Prob. Chi-Square(2)

0.0114

Heterocedasticidad
Homocedasticidad
Heterocedasticidad

Al parecer la func in es Heterocedstica


Heteroskedasticity Test: Harvey
F-statistic
Obs*R-squared
Scaled explained
SS

0,3678 > 0,05


0,3025 > 0,05
0,0869 > 0,05

1.120069
2.391577

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

0.3678
0.3025

4.886151

Prob. Chi-Square(2)

0.0869

Homocedasticidad
Homocedasticidad
Homocedasticidad

Segn el test de Harvey la funcin es homocedstica


Heteroskedasticity Test: Glejser
F-statistic
Obs*R-squared
Scaled explained
SS
0,0044< 0,05
0,0149< 0,05
0,0073< 0,05

10.52944
8.407051

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

0.0044
0.0149

9.845971

Prob. Chi-Square(2)

0.0073

Heterocedasticidad
Heterocedasticidad
Heterocedasticidad

Segn el test de Glejser, la funcin es heterocedstica


Heteroskedasticity Test: White
F-statistic
Obs*R-squared
Scaled explained
SS
0,0036< 0,05
0.0516 > 0,05
0,0073< 0,05

13.02399
10.98763

Prob. F(5,6)
Prob. Chi-Square(5)

0.0036
0.0516

11.66584

Prob. Chi-Square(5)

0.0397

Heterocedasticidad
Homocedstica
Heterocedasticidad

Al parecer segn el test de White la funcin es heterocedstica


En general los test tienden a mostrar no categricamente que la funcin es
heterocedstica. El test de Harvey seala que la funcin es homocedastica.

RUIDO BLANCO
PRUEBE DE JAQUE BERA
E

, )

Ho= Es normal E
Ha= No es normal

, )

Como el valor de la probabilidad 0.287017 es mayor que 0,05, no es


estadsticamente significativo, y se acepta la hiptesis nula
El comportamiento de los residuos es normal. Hay ruido blanco
AUTOCORRELACIN
DURBIN WATSON
N= 12 K=2
No hay autocorrelacin

2.105986

0.812

1.579

2.42

3.19

El modelo logartmico es mejor que el anterior, pero al parecer persiste el


problema de la heterocedasticidad. En este caso como se procede?

FILTRO DE HODRICK PRESCOTT PARA NORMALIZAR LAS


SERIES
Serie sin filtro
Constante

Demanda del ame

Serie con el filtro

Precio ame

Precio yuca

Series con filtro


Base de datos normalizadas
Precio_na
me

Name

Demanda del ame

Precio_yu
ca

32,593

17,606

3,689

34,559

16,395

5,463

36,519

15,187

7,229

38,472

13,983

8,977

40,430

12,782

10,693

42,413

11,580

12,372

Precio del ame

Precio de la yuca

Dependent Variable: NAME


Method: Least Squares
Date: 04/07/11 Time: 17:28
Sample: 1 12
Included observations: 12
Variable
C

Coefficient

Std. Error

t-Statistic

Prob.

111.4606

5.025421

22.17936

0.0000

PRECIO_NAME
PRECIO_YUCA

-4.111177
-1.736232

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

0.999891
0.999867
0.085944
0.066477
14.14760
41230.31
0.000000

0.245689
0.178705

-16.73329
-9.715657

Mean dependent var


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

0.0000
0.0000
43.66667
7.441564
-1.857933
-1.736706
-1.902815
0.663833

Estimation Command:
=========================
LS NAME C PRECIO_NAME PRECIO_YUCA
Estimation Equation:
=========================
NAME = C(1) + C(2)*PRECIO_NAME + C(3)*PRECIO_YUCA
Substituted Coefficients:
=========================
NAME = 111.460638407 - 4.11117735263*PRECIO_NAME 1.73623237398*PRECIO_YUCA

MULTICOLINEALIDAD
R2= 99,91%. Lo que indica que la variacin de y explicada por las variables
explicativas de X, es en un 99,91%. Los t son estadsticamente significativos y
F es estadsticamente significativa, demuestra que
no existe
multicolinealidad.
Probabilidad To = 0,0000 < 0,05. C es estadsticamente significativo
Probabilidad T1 = 0,0000 < 0.05. El precio del ame es estadsticamente
significativo.
Probabilidad T2 = 0,0000 < 0,05 El precio de la yuca es estadsticamente
significativo.
Probabilidad F = 0.0000 < 0,05.
Se rechaza Ho y se acepta de que los verdaderos coeficientes no son
simultneamente iguales a cero.
MATRIX DE CORRELACIN

NAME

NAME

PRECIO_NAME

PRECIO_YUCA

1.000000

-0.999373

0.998246

PRECIO_NAME

-0.999373

1.000000

-0.999701

PRECIO_YUCA

0.998246

-0.999701

1.000000

r23 = -0.99701
Si el valor de r23 0,50 hay multicolinealidad. En este caso -0.999701 es
menor a 0,5 no hay multicolinealidad
Prueba FIV = 1/ (1-R232)= 1 / 0,001 =1.000 > 2. Segn esta prueba hay
presencia de multicolinealidad.
Existe o no la multicolinealidad?

HETEROCEDASTICIDAD
Heteroskedasticity Test: Breusch-Pagan-Godfrey
F-statistic
Obs*R-squared
Scaled explained
SS

0,2878 > 0,05


0,2344 > 0,05
0,7261 >0,05

1.434882
2.901251

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

0.2878
0.2344

0.640234

Prob. Chi-Square(2)

0.7261

Homocedasticidad
Homocedasticidad
Homocedasticidad

Segn Breusch-Pagan-Godfrey la func in es homocedstica

Heteroskedasticity Test: Harvey


F-statistic
Obs*R-squared
Scaled explained SS

0.043653
0.115291
0.092651

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

0.9575
0.9440
0.9547

Segn el test de Harvey la funcin es homocedstica


Heteroskedasticity Test: Glejser
F-statistic
Obs*R-squared
Scaled explained SS

0.402395
0.984975
0.513607

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

0.6802
0.6111
0.7735

Segn el test de Glejser, la funcin es homocedstica


Heteroskedasticity Test: White
F-statistic
Obs*R-squared
Scaled explained SS

0.911237
4.108932
0.906739

Prob. F(4,7)
Prob. Chi-Square(4)
Prob. Chi-Square(4)

0.5069
0.3915
0.9236

Segn el test de White la funcin es homocedstica.


En general los test tienden a mostrar que la funcin es homocedastica.
RUIDO BLANCO
PRUEBE DE JAQUE BERA
E

, )

Ho= Es normal E

, )

Ha= No es normal

Como el valor de la probabilidad 0.675019 es mayor que 0,05, no es


estadsticamente significativo, y no se rechaza la hiptesis nula

El comportamiento de los residuos es normal. Hay ruido blanco


AUTOCORRELACIN
DURBIN WATSON
N= 12 K=2
Hay autocorrelacin
positiva
0,663833

0.812

1.579

2.42

3.19

Se corrige la autocorrelacin con correlacin serial BREUSCHGODFREY


RESIDUO = Bo +B1x+B2X2+resid (-1)
N= 12 K=3
Breusch-Godfrey Serial Correlation LM Test:
F-statistic
Obs*R-squared

8.824514
6.294040

Prob. F(1,8)
Prob. Chi-Square(1)

0.0179
0.0121

Test Equation:
Dependent Variable: RESID
Method: Least Squares
Date: 04/07/11 Time: 18:23
Sample: 1 12
Included observations: 12
Presample missing value lagged residuals set to zero.
Variable

Coefficient

Std. Error

t-Statistic

Prob.

C
PRECIO_NAME
PRECIO_YUCA
RESID(-1)

6.970383
-0.342571
-0.245421
1.066018

4.360677
0.213516
0.154625
0.358855

1.598464
-1.604432
-1.587206
2.970608

0.1486
0.1473
0.1511
0.0179

R-squared
Adjusted R-squared
S.E. of regression

0.524503
0.346192
0.062858

Mean dependent var


S.D. dependent var
Akaike info criterion

-1.22E-14
0.077739
-2.434662

Sum squared resid


Log likelihood
F-statistic
Prob(F-statistic)

0,0121 < 0,05

0.031609
18.60797
2.941505
0.098841

Schwarz criterion
Hannan-Quinn criter.
Durbin-Watson stat

-2.273026
-2.494505
1.070635

hay autocorrelacin

Estimation Command:
=========================
LS NAME C PRECIO_NAME PRECIO_YUCA
Estimation Equation:
=========================
NAME = C(1) + C(2)*PRECIO_NAME + C(3)*PRECIO_YUCA
Substituted Coefficients:
=========================
NAME = 111.460638407 - 4.11117735263*PRECIO_NAME - 1.73623237398*PRECIO_YUCA

El modelo normalizado tiene autocorrelacin


Cual modelo es mejor, el log-log con heterocedasticidad o el modelo
normalizado con autocorrelacin?. Cmo se procede en este caso?

También podría gustarte