*Elasticidad ingreso del gasto en electricidad (Modelo Restringido). reg lviv ling

chow[1] ------------------------------------------------------------------------------------------------------------------------log: C:\datos\docencia
Author:  Lorenzo Vega Toro

2 downloads 84 Views 13KB Size

Recommend Stories


FLUJO INGRESO - GASTO
FLUJO INGRESO - GASTO INGRESOS GASTOS Factores de Contraprestación producción. Consumo Corrientes Necesarios Reducción patrimonio Aumento patri

La elasticidad PIB del gasto social en países seleccionados de América Latina
LA ELASTICIDAD PIB DEL GASTO SOCIAL EN PAÍSES SELECCIONADOS DE AMÉRICA LATINA Omar Bello | Ramiro Ruiz del C. La elasticidad PIB del gasto social en

Story Transcript

chow[1] ------------------------------------------------------------------------------------------------------------------------log: C:\datos\docencia\econIccee\practicas2009\chow.log log type: text opened on: 17 Sep 2009, 17:58:52 . . use "$ruta\chow.dta", clear . . * crear variable logaritmo de 1+ingreso del hogar . g ling=ln(1+ing_tot) . . * crear variable logaritmo de 1+gasto en vivienda del hogar . g lviv=ln(1+gvivienda) . . * crear variable dummy "Montevideo" . . g Montevideo=(dpto==1) . . * crear una variable interacción Montevido-Ingreso . g lingMvdeo=ling*Montevideo . . . *Elasticidad ingreso del gasto en electricidad (Modelo Restringido) . reg lviv ling Source | SS df MS -------------+-----------------------------Model | 8233.4231 1 8233.4231 Residual | 7024.38039 20770 .338198382 -------------+-----------------------------Total | 15257.8035 20771 .734572408

Number of obs F( 1, 20770) Prob > F R-squared Adj R-squared Root MSE

= 20772 =24344.95 = 0.0000 = 0.5396 = 0.5396 = .58155

-----------------------------------------------------------------------------lviv | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------ling | .7635228 .0048935 156.03 0.000 .7539312 .7731144 _cons | .407958 .0473869 8.61 0.000 .315076 .5008399 -----------------------------------------------------------------------------. scalar SCR_restrin=e(rss) . scalar k=e(df_m)+1 . scalar Nobs=e(N) . . *Elasticidad ingreso del gasto en electricidad Montevideo . reg lviv ling if Montevideo==1 Source | SS df MS -------------+-----------------------------Model | 2976.04855 1 2976.04855 Residual | 2086.47157 7176 .290756908 -------------+-----------------------------Total | 5062.52012 7177 .705381095

Number of obs F( 1, 7176) Prob > F R-squared Adj R-squared Root MSE

= 7178 =10235.52 = 0.0000 = 0.5879 = 0.5878 = .53922

-----------------------------------------------------------------------------lviv | Coef. Std. Err. t P>|t| [95% Conf. Interval] Página 1

chow[1] -------------+---------------------------------------------------------------ling | .7299952 .0072155 101.17 0.000 .7158507 .7441396 _cons | 1.064812 .0726767 14.65 0.000 .9223438 1.207279 -----------------------------------------------------------------------------. scalar SCR_nrestrin_1=e(rss) . . . *Elasticidad ingreso del gasto en electricidad Montevideo . reg lviv ling if Montevideo==0 Source | SS df MS -------------+-----------------------------Model | 2444.99857 1 2444.99857 Residual | 3608.49385 13592 .265486599 -------------+-----------------------------Total | 6053.49242 13593 .445338955

Number of obs F( 1, 13592) Prob > F R-squared Adj R-squared Root MSE

= 13594 = 9209.50 = 0.0000 = 0.4039 = 0.4039 = .51525

-----------------------------------------------------------------------------lviv | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------ling | .5947658 .0061977 95.97 0.000 .5826176 .6069141 _cons | 1.832686 .0587044 31.22 0.000 1.717617 1.947755 -----------------------------------------------------------------------------. scalar SCR_nrestrin_2=e(rss) . . . * CONTRASTE DE CHOW . scalar CHOW1=(SCR_restrin-(SCR_nrestrin_1+SCR_nrestrin_2))/k/((SCR_nrestrin_1+SCR_nrestri n_2)/(Nobs-2*k)) . scalar p_valor=1-F(k,Nobs-2*k,CHOW1) . display p_valor 0 . . *Elasticidad ingreso del gasto para Montevideo e Interior: . *CONTRASTE ESTRUCTURAL DE CHOW UTILIZANDO VARIABLES DUMMY . reg lviv Montevideo ling lingMvdeo Source | SS df MS -------------+-----------------------------Model | 9562.83806 3 3187.61269 Residual | 5694.96542 20768 .274218289 -------------+-----------------------------Total | 15257.8035 20771 .734572408

Number of obs F( 3, 20768) Prob > F R-squared Adj R-squared Root MSE

= 20772 =11624.36 = 0.0000 = 0.6268 = 0.6267 = .52366

-----------------------------------------------------------------------------lviv | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------Montevideo | -.7678746 .0924176 -8.31 0.000 -.9490204 -.5867289 ling | .5947658 .0062988 94.43 0.000 .5824198 .6071119 lingMvdeo | .1352293 .0094221 14.35 0.000 .1167613 .1536974 _cons | 1.832686 .059662 30.72 0.000 1.715744 1.949628 -----------------------------------------------------------------------------. test Montevideo lingMvdeo ( 1)

Montevideo = 0 Página 2

chow[1] ( 2)

lingMvdeo = 0 F(

2, 20768) = 2424.01 Prob > F = 0.0000

. . *Calcular el estadìstico F del contraste por otra via: Usando (Rbeta_es-r)'{[RVar(beta_es)R']^-1}(Rbeta_es-r)/k . *Siendo Var(beta_es) la que se observa a continuación . matrix Varcovar=e(V) . matrix list Varcovar symmetric Varcovar[4,4] Montevideo ling Montevideo .00854101 ling .00037473 .00003967 lingMvdeo -.0008674 -.00003967 _cons -.00355955 -.00037473

lingMvdeo

_cons

.00008878 .00037473

.00355955

. . . . *ESTIMANDO OTRAS ESPECIFICACIONES . *Elasticidad ingreso del gasto en electricidad estimando un intercepto diferente para Montevideo e Interior . reg lviv Montevideo ling Source | SS df MS -------------+-----------------------------Model | 9506.35185 2 4753.17593 Residual | 5751.45163 20769 .276924822 -------------+-----------------------------Total | 15257.8035 20771 .734572408

Number of obs F( 2, 20769) Prob > F R-squared Adj R-squared Root MSE

= 20772 =17164.14 = 0.0000 = 0.6230 = 0.6230 = .52624

-----------------------------------------------------------------------------lviv | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------Montevideo | .5534025 .0081624 67.80 0.000 .5374034 .5694015 ling | .6552003 .0047075 139.18 0.000 .6459733 .6644274 _cons | 1.261873 .0446913 28.24 0.000 1.174275 1.349472 -----------------------------------------------------------------------------. . *Elasticidad ingreso del gasto en electricidad estimando una elasticidad diferente para Montevideo e Interior . reg lviv ling lingMvdeo Source | SS df MS -------------+-----------------------------Model | 9543.90732 2 4771.95366 Residual | 5713.89616 20769 .275116576 -------------+-----------------------------Total | 15257.8035 20771 .734572408

Number of obs F( 2, 20769) Prob > F R-squared Adj R-squared Root MSE

= 20772 =17345.21 = 0.0000 = 0.6255 = 0.6255 = .52452

-----------------------------------------------------------------------------lviv | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------ling | .6284557 .004828 130.17 0.000 .6189925 .6379189 lingMvdeo | .0572464 .0008295 69.02 0.000 .0556206 .0588722 _cons | 1.512667 .0456385 33.14 0.000 1.423212 1.602122 -----------------------------------------------------------------------------. Página 3

chow[1] . . *TEST DE RAMSEY en modelo no restringido . reg lviv Montevideo ling lingMvdeo Source | SS df MS -------------+-----------------------------Model | 9562.83806 3 3187.61269 Residual | 5694.96542 20768 .274218289 -------------+-----------------------------Total | 15257.8035 20771 .734572408

Number of obs F( 3, 20768) Prob > F R-squared Adj R-squared Root MSE

= 20772 =11624.36 = 0.0000 = 0.6268 = 0.6267 = .52366

-----------------------------------------------------------------------------lviv | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------Montevideo | -.7678746 .0924176 -8.31 0.000 -.9490204 -.5867289 ling | .5947658 .0062988 94.43 0.000 .5824198 .6071119 lingMvdeo | .1352293 .0094221 14.35 0.000 .1167613 .1536974 _cons | 1.832686 .059662 30.72 0.000 1.715744 1.949628 -----------------------------------------------------------------------------. . estat ovtest Ramsey RESET test using powers of the fitted values of lviv Ho: model has no omitted variables F(3, 20765) = 383.16 Prob > F = 0.0000 . predict plviv, xb . . g plviv2=plviv^2 . g plviv3=plviv^3 . g plviv4=plviv^4 . . reg lviv Montevideo ling lingMvdeo plviv2-plviv4 Source | SS df MS -------------+-----------------------------Model | 9861.5552 6 1643.59253 Residual | 5396.24828 20765 .259872298 -------------+-----------------------------Total | 15257.8035 20771 .734572408

Number of obs F( 6, 20765) Prob > F R-squared Adj R-squared Root MSE

= 20772 = 6324.62 = 0.0000 = 0.6463 = 0.6462 = .50978

-----------------------------------------------------------------------------lviv | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------Montevideo | -1.074234 .4191677 -2.56 0.010 -1.895836 -.2526328 ling | 2.172739 .3647315 5.96 0.000 1.457837 2.887641 lingMvdeo | .2993238 .0761617 3.93 0.000 .1500409 .4486067 plviv2 | -1.313952 .1646277 -7.98 0.000 -1.636635 -.991269 plviv3 | .1669429 .0177557 9.40 0.000 .1321403 .2017455 plviv4 | -.0065494 .0006709 -9.76 0.000 -.0078644 -.0052344 _cons | 10.96083 .5138965 21.33 0.000 9.953553 11.96811 -----------------------------------------------------------------------------. test plviv2 plviv3 plviv4 ( 1) ( 2) ( 3)

plviv2 = 0 plviv3 = 0 plviv4 = 0 Página 4

chow[1] F(

3, 20765) = Prob > F =

383.16 0.0000

. . *Calcular el estadìstico F del contraste por otra via: Usando (Rbeta_es-r)'{[RVar(beta_es)R']^-1}(Rbeta_es-r)/3 . *Notar que la matriz de Varcovar es la calculada màs arriba que se reproduce a continuación . matrix list Varcovar symmetric Varcovar[4,4] Montevideo ling Montevideo .00854101 ling .00037473 .00003967 lingMvdeo -.0008674 -.00003967 _cons -.00355955 -.00037473

lingMvdeo

_cons

.00008878 .00037473

.00355955

. . . log close log: C:\datos\docencia\econIccee\practicas2009\chow.log log type: text closed on: 17 Sep 2009, 17:58:53 -------------------------------------------------------------------------------------------------------------------------

Página 5

Get in touch

Social

© Copyright 2013 - 2024 MYDOKUMENT.COM - All rights reserved.