ECONOMETR´IA II
PR ´ ACTICAS DE ORDENADOR Pr´ actica 1
1.- El fichero epflic.wf1 contiene una submuestra de 3371 hogares de la En- cuesta de Presupuestos Familiares 1990/91 formada por parejas con o sin hijos en las que el marido ha completado los estudios obligatorios, tiene entre 24 y 65 a˜ nos y trabaja por cuenta ajena en una actividad no agraria; la mujer no trabaja. Las variables incluidas en el archivo son:
1. hedad → Edad del marido 2. medad → Edad de la mujer
3. hijos → N´ umero de hijos menores de 18 a˜ nos.
4. adultos → N´ umero de adultos en el hogar.
5. galim → Gasto en alimentaci´on, bebidas y tabaco (en cientos de miles de pesetas). El gasto en alimentaci´on no incluye las comidas realizadas fuera del hogar.
6. gtotal → Gasto total (en cientos de miles de pesetas).
7. renta → Renta del hogar (en cientos de miles de pesetas).
Utilizando estos datos:
a) Estime una curva de Engel lineal para el gasto en alimentaci´on (q = f(x, z, β)), donde q es el gasto en alimentaci´on (en cientos de miles de pesetas), x es el gasto total (en cientos de miles de pesetas) y z es un vector de caracter´ısticas del hogar (n´ umero de adultos, n´ umero de ni˜ nos y edad del marido). Comente los resultados.
b) Represente gr´aficamente los residuos en funci´on del gasto total y comente los resultados.
c) Contraste la hip´otesis de homocedasticidad de las perturbaciones utilizando el contraste de White. Realice primero el contraste generando las variables que necesite y efectuando la regresi´on apropiada. A continuaci´on utilice el comando que proporciona EVIEWS para realizar el contraste de White y compruebe que los resultados obtenidos son los mismos.
d) Contraste la hip´otesis nula de que el n´ umero de adultos y el n´ umero de ni˜ nos en el hogar tienen el mismo efecto sobre el gasto en alimentaci´on.
e) Suponga ahora que la varianza de las perturbaciones aleatorias de la curva de Engel es σ
2t= σ
2x
αt2donde x
tes el gasto total. Obtenga un estimador de α
2en base al modelo ln(e
2t) = γ + α
2ln(x
t) + v
t, donde e
tson los residuos obtenidos en el apartado a). Calcule el estimador MCGF de los par´ametros de la curva de Engel.
f ) Contraste si el supuesto sobre la varianza del apartado e) es correcto.
2.- Considere la funci´on de costes totales
y
t= β
1+ β
2x
t+ β
3x
2t+ β
4x
3t+ u
t1
donde y
tes el coste total y x
tes el output de la empresa t.
a) Utilizando los datos del fichero costes2.txt (fichero ASCII que contiene datos sobre costes y producci´on (output) para 100 empresas), obtenga el estimador MCO de los par´ametros de la funci´on de costes totales y calcule los errores est´andar.
b) Represente gr´aficamente los residuos en funci´on del output y comente los resultados.
c) Contraste la hip´otesis de homocedasticidad de las perturbaciones utilizando el contraste de White. Realice primero el contraste generando las variables que necesite y efectuando la regresi´on apropiada. A continuaci´on utilice el comando que proporciona EVIEWS para realizar el contraste de White y compruebe que los resultados obtenidos son los mismos.
d) Contraste si ser´ıa suficiente una especificaci´on lineal para la funci´on de costes totales.
e) Suponga ahora que la varianza de las perturbaciones aleatorias de la funci´on de costes es σ
2t= σ
2x
2tdonde x
tes el output. Calcule el estimador MCG de los par´ametros de la funci´on de costes.
f ) Utilizando los resultados de la estimaci´on MCG, represente gr´aficamente la curva de costes medios y marginales.
g) Contraste si el supuesto sobre la varianza del apartado e) es correcto.
2
Práctica 1 Ejercicio 1
Tabla 1
Dependent Variable: GALIM Method: Least Squares Sample: 1 3371
Included observations: 3371
Variable Coefficient Std. Error t-Statistic Prob.
C 0.612480 0.281677 2.174407 0.0297
GTOTAL 0.132891 0.003908 34.00357 0.0000 HIJOS 0.588184 0.047104 12.48691 0.0000 ADULTOS 0.554692 0.052484 10.56881 0.0000 HEDAD 0.020488 0.005868 3.491239 0.0005 R-squared 0.358008 Mean dependent var 7.298756 Adjusted R-squared 0.357245 S.D. dependent var 3.319821 S.E. of regression 2.661567 Akaike info criterion 4.797189 Sum squared resid 23844.54 Schwarz criterion 4.806271 Log likelihood -8080.663 F-statistic 469.2635 Durbin-Watson stat 1.872327 Prob(F-statistic) 0.000000
Gráfico 1
-20 -10 0 10 20 30
0 40 80 120 160 200
GTOTAL
RESID01
Tabla 2
Dependent Variable: RESID2 Method: Least Squares Sample: 1 3371
Included observations: 3371
Variable Coefficient Std. Error t-Statistic Prob.
C -12.45965 8.926000 -1.395883 0.1628 GTOTAL 0.141710 0.185590 0.763569 0.4452 HIJOS -1.780543 2.280705 -0.780698 0.4350 ADULTOS -1.347581 2.979472 -0.452289 0.6511 HEDAD 0.710747 0.370613 1.917761 0.0552 GTOTAL2 0.009986 0.000742 13.45572 0.0000 ADGTOT -0.075124 0.029368 -2.558002 0.0106 HIGTOT 0.053117 0.029766 1.784458 0.0744 HEGTOT -0.001908 0.003820 -0.499526 0.6174 ADULTOS2 0.360182 0.227870 1.580648 0.1141 HIADULT 0.210808 0.404052 0.521733 0.6019 HEADULT 0.001080 0.051418 0.021003 0.9832 HIJOS2 0.334575 0.216884 1.542644 0.1230 HEHIJOS -0.035979 0.047123 -0.763512 0.4452 HEDAD2 -0.007046 0.004366 -1.613829 0.1067 R-squared 0.211117 Mean dependent var 7.073432 Adjusted R-squared 0.207826 S.D. dependent var 20.80356 S.E. of regression 18.51604 Akaike info criterion 8.679591 Sum squared resid 1150583. Schwarz criterion 8.706837 Log likelihood -14614.45 F-statistic 64.15109 Durbin-Watson stat 1.904425 Prob(F-statistic) 0.000000
Tabla 3
White Heteroskedasticity Test:
F-statistic 64.15109 Prob. F(14,3356) 0.000000 Obs*R-squared 711.6748 Prob. Chi-Square(14) 0.000000
Test Equation:
Dependent Variable: RESID^2 Method: Least Squares Sample: 1 3371
Included observations: 3371
Variable Coefficient Std. Error t-Statistic Prob.
C -12.45965 8.926000 -1.395883 0.1628 GTOTAL 0.141710 0.185590 0.763569 0.4452 GTOTAL^2 0.009986 0.000742 13.45572 0.0000 GTOTAL*HIJOS 0.053117 0.029766 1.784458 0.0744 GTOTAL*ADULTOS -0.075124 0.029368 -2.558002 0.0106 GTOTAL*HEDAD -0.001908 0.003820 -0.499526 0.6174 HIJOS -1.780543 2.280705 -0.780698 0.4350 HIJOS^2 0.334575 0.216884 1.542644 0.1230 HIJOS*ADULTOS 0.210808 0.404052 0.521733 0.6019 HIJOS*HEDAD -0.035979 0.047123 -0.763512 0.4452 ADULTOS -1.347581 2.979472 -0.452289 0.6511 ADULTOS^2 0.360182 0.227870 1.580648 0.1141 ADULTOS*HEDAD 0.001080 0.051418 0.021003 0.9832 HEDAD 0.710747 0.370613 1.917761 0.0552 HEDAD^2 -0.007046 0.004366 -1.613829 0.1067 R-squared 0.211117 Mean dependent var 7.073432 Adjusted R-squared 0.207826 S.D. dependent var 20.80356 S.E. of regression 18.51604 Akaike info criterion 8.679591 Sum squared resid 1150583. Schwarz criterion 8.706837 Log likelihood -14614.45 F-statistic 64.15109 Durbin-Watson stat 1.904425 Prob(F-statistic) 0.000000
Tabla 4
Dependent Variable: GALIM Method: Least Squares Sample: 1 3371
Included observations: 3371
White Heteroskedasticity-Consistent Standard Errors & Covariance
Variable Coefficient Std. Error t-Statistic Prob.
C 0.612480 0.274143 2.234163 0.0255
GTOTAL 0.132891 0.009369 14.18429 0.0000 HIJOS 0.588184 0.048573 12.10935 0.0000 ADULTOS 0.554692 0.062021 8.943668 0.0000 HEDAD 0.020488 0.005345 3.832891 0.0001 R-squared 0.358008 Mean dependent var 7.298756 Adjusted R-squared 0.357245 S.D. dependent var 3.319821 S.E. of regression 2.661567 Akaike info criterion 4.797189 Sum squared resid 23844.54 Schwarz criterion 4.806271 Log likelihood -8080.663 F-statistic 469.2635 Durbin-Watson stat 1.872327 Prob(F-statistic) 0.000000
Tabla 5 Wald Test:
Equation: EQ03
Test Statistic Value df Probability F-statistic 0.224434 (1, 3366) 0.6357
Chi-square 0.224434 1 0.6357
Null Hypothesis Summary:
Normalized Restriction (= 0) Value Std. Err.
C(3) - C(4) 0.033492 0.070697
Restrictions are linear in coefficients.
Tabla 6
Dependent Variable: LRES2 Method: Least Squares Sample: 1 3371
Included observations: 3371
Variable Coefficient Std. Error t-Statistic Prob.
C -3.844199 0.270852 -14.19298 0.0000 LGTOT 1.332223 0.085325 15.61345 0.0000 R-squared 0.067477 Mean dependent var 0.342652 Adjusted R-squared 0.067200 S.D. dependent var 2.291351 S.E. of regression 2.213022 Akaike info criterion 4.427188 Sum squared resid 16499.57 Schwarz criterion 4.430821 Log likelihood -7460.026 F-statistic 243.7798 Durbin-Watson stat 1.917055 Prob(F-statistic) 0.000000
Tabla 7
Dependent Variable: TGALIM Method: Least Squares Sample: 1 3371
Included observations: 3371
Variable Coefficient Std. Error t-Statistic Prob.
TC 0.333576 0.209881 1.589360 0.1121
TGTOTAL 0.173673 0.004118 42.16975 0.0000 THIJOS 0.496303 0.036675 13.53249 0.0000 TADULTOS 0.379198 0.045221 8.385418 0.0000 TEDAD 0.017779 0.004360 4.077398 0.0000 R-squared 0.041366 Mean dependent var 0.867817 Adjusted R-squared 0.040227 S.D. dependent var 0.284620 S.E. of regression 0.278837 Akaike info criterion 0.285100 Sum squared resid 261.7058 Schwarz criterion 0.294182 Log likelihood -475.5358 Durbin-Watson stat 1.872826
Tabla 8
White Heteroskedasticity Test:
F-statistic 7.942054 Probability 0.000000 Obs*R-squared 152.6012 Probability 0.000000 Test Equation:
Dependent Variable: RESID^2 Method: Least Squares Sample: 1 3371
Included observations: 3371
Variable Coefficient Std. Error t-Statistic Prob.
C -16.50737 17.60204 -0.937810 0.3484 TC -57.57894 48.56897 -1.185509 0.2359 TC^2 21.08941 25.40866 0.830009 0.4066 TC*TGTOTAL 50.39722 45.47176 1.108319 0.2678 TC*THIJOS 3.869938 1.311917 2.949834 0.0032 TC*TADULTOS 3.258200 2.097968 1.553026 0.1205 TC*TEDAD 0.303813 0.191081 1.589975 0.1119 TGTOTAL 2.225192 3.129081 0.711133 0.4771 TGTOTAL^2 -0.089907 0.212583 -0.422925 0.6724 TGTOTAL*THIJOS 0.369870 0.140828 2.626400 0.0087 TGTOTAL*TADULTO
S
0.312485 0.174233 1.793483 0.0730 TGTOTAL*TEDAD 0.017486 0.018571 0.941602 0.3465 THIJOS -1.520830 0.542987 -2.800858 0.0051 THIJOS^2 0.036072 0.072035 0.500764 0.6166 THIJOS*TADULTOS 0.348217 0.172106 2.023271 0.0431 THIJOS*TEDAD -0.034069 0.015876 -2.146015 0.0319 TADULTOS -1.693707 0.716153 -2.365009 0.0181 TADULTOS^2 0.246299 0.114127 2.158113 0.0310 TADULTOS*TEDAD 0.008485 0.019897 0.426428 0.6698 TEDAD -0.059487 0.070886 -0.839203 0.4014 TEDAD^2 -0.002001 0.001390 -1.439996 0.1500 R-squared 0.045269 Mean dependent var 0.077634 Adjusted R-squared 0.039569 S.D. dependent var 0.135822 S.E. of regression 0.133107 Akaike info criterion -1.189110 Sum squared resid 59.35393 Schwarz criterion -1.150967 Log likelihood 2025.245 F-statistic 7.942054 Durbin-Watson stat 1.808007 Prob(F-statistic) 0.000000
Ejercicio 2
Tabla 1
Dependent Variable: COSTES Method: Least Squares Sample: 1 100
Included observations: 100
Variable Coefficient Std. Error t-Statistic Prob.
C 151.5688 61.35858 2.470214 0.0153
OUTPUT 30.45223 38.41634 0.792689 0.4299 OUTPUT2 -4.534299 7.043626 -0.643745 0.5213 OUTPUT3 0.675810 0.380772 1.774842 0.0791 R-squared 0.755157 Mean dependent var 341.0400 Adjusted R-squared 0.747505 S.D. dependent var 195.7171 S.E. of regression 98.34562 Akaike info criterion 12.05403 Sum squared resid 928498.6 Schwarz criterion 12.15824 Log likelihood -598.7016 F-statistic 98.69577 Durbin-Watson stat 2.089989 Prob(F-statistic) 0.000000
Gráfico 1
-300 -200 -100 0 100 200 300 400
0 2 4 6 8 10 12
OUTPUT
R E S ID
Tabla 2
Dependent Variable: RESID2 Method: Least Squares Sample: 1 100
Included observations: 100
Variable Coefficient Std. Error t-Statistic Prob.
C -1328.928 30524.24 -0.043537 0.9654 OUTPUT -663.4361 55414.21 -0.011972 0.9905 OUTPUT2 4590.417 34329.47 0.133717 0.8939 OUTPUT3 -2749.750 9818.629 -0.280054 0.7801 OUTPUT4 638.9214 1419.067 0.450241 0.6536 OUTPUT6 2.069671 2.768237 0.747649 0.4566 OUTPUT5 -61.50624 100.5353 -0.611788 0.5422 R-squared 0.218638 Mean dependent var 9284.986 Adjusted R-squared 0.168228 S.D. dependent var 16528.27 S.E. of regression 15074.04 Akaike info criterion 22.14676 Sum squared resid 2.11E+10 Schwarz criterion 22.32913 Log likelihood -1100.338 F-statistic 4.337167 Durbin-Watson stat 2.042512 Prob(F-statistic) 0.000666
Tabla 3
White Heteroskedasticity Test:
F-statistic 4.337167 Prob. F(6,93) 0.000666 Obs*R-squared 21.86384 Prob. Chi-Square(6) 0.001282
Test Equation:
Dependent Variable: RESID^2 Method: Least Squares Sample: 1 100
Included observations: 100
Variable Coefficient Std. Error t-Statistic Prob.
C -1328.928 30524.24 -0.043537 0.9654 OUTPUT -663.4360 55414.21 -0.011972 0.9905 OUTPUT^2 4590.417 34329.47 0.133717 0.8939 OUTPUT*OUTPUT2 -2749.750 9818.629 -0.280054 0.7801 OUTPUT*OUTPUT3 638.9214 1419.067 0.450241 0.6536 OUTPUT2*OUTPUT3 -61.50624 100.5352 -0.611788 0.5422 OUTPUT3^2 2.069671 2.768237 0.747649 0.4566 R-squared 0.218638 Mean dependent var 9284.986 Adjusted R-squared 0.168228 S.D. dependent var 16528.27 S.E. of regression 15074.04 Akaike info criterion 22.14676 Sum squared resid 2.11E+10 Schwarz criterion 22.32913 Log likelihood -1100.338 F-statistic 4.337167 Durbin-Watson stat 2.042512 Prob(F-statistic) 0.000666
Tabla 4
Dependent Variable: COSTES Method: Least Squares Sample: 1 100
Included observations: 100
White Heteroskedasticity-Consistent Standard Errors & Covariance
Variable Coefficient Std. Error t-Statistic Prob.
C 151.5688 33.24000 4.559833 0.0000 OUTPUT 30.45223 29.14603 1.044815 0.2987 OUTPUT2 -4.534299 6.343882 -0.714751 0.4765 OUTPUT3 0.675810 0.369394 1.829510 0.0704 R-squared 0.755157 Mean dependent var 341.0400 Adjusted R-squared 0.747505 S.D. dependent var 195.7171 S.E. of regression 98.34562 Akaike info criterion 12.05403 Sum squared resid 928498.6 Schwarz criterion 12.15824 Log likelihood -598.7016 F-statistic 98.69577
Tabla 5 Wald Test:
Equation: EQ03
Test Statistic Value df Probability F-statistic 31.47273 (2, 96) 0.0000
Chi-square 62.94546 2 0.0000
Tabla 6
Dependent Variable: TCOSTES Method: Least Squares
Sample: 1 100
Included observations: 100
Variable Coefficient Std. Error t-Statistic Prob.
TC 134.9594 12.74053 10.59292 0.0000 C 46.09351 15.51933 2.970071 0.0038 OUTPUT -8.012148 4.137904 -1.936282 0.0558 OUTPUT2 0.884664 0.289628 3.054479 0.0029 R-squared 0.829111 Mean dependent var 71.45012 Adjusted R-squared 0.823771 S.D. dependent var 39.97046 S.E. of regression 16.77948 Akaike info criterion 8.517368 Sum squared resid 27028.88 Schwarz criterion 8.621575 Log likelihood -421.8684 F-statistic 155.2559 Durbin-Watson stat 2.136411 Prob(F-statistic) 0.000000
Gráfico 2
0 50 100 150 200 250 300
0 2 4 6 8 10 12
OUTPUT
CMED
CMARG
Tabla 7
White Heteroskedasticity Test:
F-statistic 1.003044 Prob. F(6,93) 0.428202 Obs*R-squared 6.077934 Prob. Chi-Square(6) 0.414517
Test Equation:
Dependent Variable: RESID^2 Method: Least Squares Sample: 1 100
Included observations: 100
Variable Coefficient Std. Error t-Statistic Prob.
C 8091.070 4811.794 1.681508 0.0960 TC -6900.993 4662.497 -1.480107 0.1422 TC^2 1907.968 1487.831 1.282382 0.2029 TC*OUTPUT2 -3564.208 2097.922 -1.698923 0.0927 OUTPUT^2 724.6098 423.9894 1.709028 0.0908 OUTPUT*OUTPUT2 -65.25177 39.14260 -1.667027 0.0989 OUTPUT2^2 2.112221 1.328831 1.589533 0.1153 R-squared 0.060779 Mean dependent var 270.2888 Adjusted R-squared 0.000184 S.D. dependent var 388.4276 S.E. of regression 388.3918 Akaike info criterion 14.82934 Sum squared resid 14028879 Schwarz criterion 15.01170 Log likelihood -734.4668 F-statistic 1.003044 Durbin-Watson stat 2.134767 Prob(F-statistic) 0.428202