You are on page 1of 10

ANLISIS DE REGRESIN FORTINO VELA PEN / UAMX

1
Ejercicios Wooldridge (2010) 5. ed.

Capitulo 2

C2.2

use "C:\fvela\econometrics wooldridge\stata\CEOSAL2.dta", clear

i)
sum salary ceoten

Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
salary | 177 865.8644 587.5893 100 5299
ceoten | 177 7.954802 7.150826 0 37

ii)
tab ceoten if ceoten ==0
tab ceoten if ceoten !=0

years as |
ceo with |
company | Freq. Percent Cum.
------------+-----------------------------------
1 | 19 11.05 11.05
2 | 10 5.81 16.86
3 | 21 12.21 29.07
4 | 21 12.21 41.28
5 | 10 5.81 47.09
6 | 11 6.40 53.49
7 | 6 3.49 56.98
8 | 11 6.40 63.37
9 | 8 4.65 68.02
10 | 8 4.65 72.67
11 | 4 2.33 75.00
12 | 7 4.07 79.07
13 | 7 4.07 83.14
14 | 5 2.91 86.05
15 | 2 1.16 87.21
16 | 2 1.16 88.37
17 | 2 1.16 89.53
18 | 1 0.58 90.12
19 | 2 1.16 91.28
20 | 4 2.33 93.60
21 | 1 0.58 94.19
22 | 1 0.58 94.77
24 | 3 1.74 96.51
26 | 2 1.16 97.67
28 | 1 0.58 98.26
34 | 1 0.58 98.84
37 | 2 1.16 100.00
------------+-----------------------------------
Total | 172 100.00


ANLISIS DE REGRESIN FORTINO VELA PEN / UAMX
2
iii)
reg lsalary ceoten

Source | SS df MS Number of obs = 177
-------------+------------------------------ F( 1, 175) = 2.33
Model | .850907024 1 .850907024 Prob > F = 0.1284
Residual | 63.795306 175 .364544606 R-squared = 0.0132
-------------+------------------------------ Adj R-squared = 0.0075
Total | 64.6462131 176 .367308029 Root MSE = .60378

------------------------------------------------------------------------------
lsalary | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
ceoten | .0097236 .0063645 1.53 0.128 -.0028374 .0222846
_cons | 6.505498 .0679911 95.68 0.000 6.37131 6.639686
------------------------------------------------------------------------------

Recuerde que ( ) x 00 1 y %
1
= (p. 46)

dis 100*.0097236
.97236 1 %



ANLISIS DE REGRESIN FORTINO VELA PEN / UAMX
3
C2.3

des

Contains data from C:\fvela\econometrics wooldridge\stata\SLEEP75.dta
obs: 706
vars: 34 26 Jan 2000 13:57
size: 49,420 (99.9% of memory free)
------------------------------------------------------------------------------
storage display value
variable name type format label variable label
------------------------------------------------------------------------------
age byte %9.0g in years
black byte %9.0g =1 if black
case int %9.0g identifier
clerical float %9.0g =1 if clerical worker
construc float %9.0g =1 if construction worker
educ byte %9.0g years of schooling
earns74 float %9.0g total earnings, 1974
gdhlth byte %9.0g =1 if in good or excel. health
inlf byte %9.0g =1 if in labor force
leis1 int %9.0g sleep - totwrk
leis2 int %9.0g slpnaps - totwrk
leis3 int %9.0g rlxall - totwrk
smsa byte %9.0g =1 if live in smsa
lhrwage float %9.0g log hourly wage
lothinc float %9.0g log othinc, unless othinc < 0
male byte %9.0g =1 if male
marr byte %9.0g =1 if married
prot byte %9.0g =1 if Protestant
rlxall int %9.0g slpnaps + personal activs
selfe byte %9.0g =1 if self employed
sleep int %9.0g mins sleep at night, per wk
slpnaps int %9.0g minutes sleep, inc. naps
south byte %9.0g =1 if live in south
spsepay float %9.0g spousal wage income
spwrk75 byte %9.0g =1 if spouse works
totwrk int %9.0g mins worked per week
union byte %9.0g =1 if belong to union
worknrm int %9.0g mins work main job
workscnd int %9.0g mins work second job
exper byte %9.0g age - educ - 6
yngkid byte %9.0g =1 if children < 3 present
yrsmarr byte %9.0g years married
hrwage float %9.0g hourly wage
agesq int %9.0g age^2
------------------------------------------------------------------------------
Sorted by:


ANLISIS DE REGRESIN FORTINO VELA PEN / UAMX
4
i)
reg sleep totwrk

Source | SS df MS Number of obs = 706
-------------+------------------------------ F( 1, 704) = 81.09
Model | 14381717.2 1 14381717.2 Prob > F = 0.0000
Residual | 124858119 704 177355.282 R-squared = 0.1033
-------------+------------------------------ Adj R-squared = 0.1020
Total | 139239836 705 197503.313 Root MSE = 421.14

------------------------------------------------------------------------------
sleep | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
totwrk | -.1507458 .0167403 -9.00 0.000 -.1836126 -.117879
_cons | 3586.377 38.91243 92.17 0.000 3509.979 3662.775
------------------------------------------------------------------------------

totwrk 0.1507458 - 3586.377 y =
n= 706 R
2
= 0.1033

donde sleep y =

3586.377

1
= = promedio de minutos de sueo por semana cuando no se dedica
tiempo al trabajo (es decir, cuando el total de minutos de trabajo por
semana es cero, esto es, totwrk=0).

ii) Dos horas es igual a 120 minutos. De acuerdo al modelo, para totwrk=120 se tiene

dis 120*-.1507458
-18.089496

Es decir, por 2 horas adicionales de trabajo, se estima una reduccin aproximada de 18
minutos en promedio, lo cual no parece tener un efecto muy grande.

twoway (sc sleep totwrk) (lfit sleep totwrk)

1
0
0
0
2
0
0
0
3
0
0
0
4
0
0
0
5
0
0
0
0 2000 4000 6000
mins worked per week
mins sleep at night, per wk Fitted values

ANLISIS DE REGRESIN FORTINO VELA PEN / UAMX
5
C2.5

i)
i i 2 1 i
u sales ln rd ln + + =
ii)

use "C:\fvela\econometrics wooldridge\stata\RDCHEM.dta", clear
reg lrd lsales

Source | SS df MS Number of obs = 32
-------------+------------------------------ F( 1, 30) = 302.72
Model | 84.8395785 1 84.8395785 Prob > F = 0.0000
Residual | 8.40768588 30 .280256196 R-squared = 0.9098
-------------+------------------------------ Adj R-squared = 0.9068
Total | 93.2472644 31 3.00797627 Root MSE = .52939

------------------------------------------------------------------------------
lrd | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
lsales | 1.075731 .0618275 17.40 0.000 .9494619 1.201999
_cons | -4.104722 .4527678 -9.07 0.000 -5.029398 -3.180047
------------------------------------------------------------------------------

i
sales ln 1.0757 4.1047 - + = y

donde modelo el por rd ln para estimado valor y =

La elasticidad estimada por el modelo esta dada por 1.0757

2
= , la cual se puede
interpretar como el cambio porcentual promedio en los gastos anuales de I&D ante el
incremento de uno por ciento de las ventas, esto es, por un aumento de 1% en las
ventas, los gastos anuales promedio en I&D aumentan en aproximadamente 1.0757%
(1.1%).

Recuerde:


ANLISIS DE REGRESIN FORTINO VELA PEN / UAMX
6
C2.6




i)
Se considera que por cada dlar ms que se gasta por estudiante, la tasa de aprobados en
matemticas debera aumentar dado que existen posibilidades de que estos enfrenten
mejores condiciones para su aprendizaje.

ANLISIS DE REGRESIN FORTINO VELA PEN / UAMX
7
ii)
use "C:\fvela\econometrics wooldridge\stata\MEAP93.dta", clear
des

Contains data from C:\fvela\econometrics wooldridge\stata\MEAP93.dta
obs: 408
vars: 17 16 Sep 1996 16:21
size: 26,928 (99.9% of memory free)
------------------------------------------------------------------------------
storage display value
variable name type format label variable label
------------------------------------------------------------------------------
lnchprg float %9.0g perc of studs in sch lnch prog
enroll int %9.0g school enrollment
staff float %9.0g staff per 1000 students
expend int %9.0g expend. per stud, $
salary float %9.0g avg. teacher salary, $
benefits int %9.0g avg. teacher benefits, $
droprate float %9.0g school dropout rate, perc
gradrate float %9.0g school graduation rate, perc
math10 float %9.0g perc studs passing MEAP math
sci11 float %9.0g perc studs passing MEAP science
totcomp float %9.0g salary + benefits
ltotcomp float %9.0g log(totcomp)
lexpend float %9.0g log of expend
lenroll float %9.0g log(enroll)
lstaff float %9.0g log(staff)
bensal float %9.0g benefits/salary
lsalary float %9.0g log(salary)
------------------------------------------------------------------------------
Sorted by:

Siguiendo lo sealado en la tabla 2.3, se enfrenta un modelo nivel-log dado por:

u + + = ) expend log( 10 math
1 0


reproducindose parte de esta tabla para ubicar con mayor claridad sus resultados.



Como se puede apreciar del cuadro, al dividir el coeficiente estimado por 100 se obtiene
el cambio en y ante un incremento de 1% en X. Si ha este resultado lo multiplicamos
por 10 (para obtener el cambio en 10% ante un cambio unitario en x) se tiene:

lexpend %
10
1

lexpend %
100
10

(10) lexpend % )
100

( math10
1 1
1

= =


lexpend %
10

=



Resultado que ofrece el cambio en math10 ante un incremento en 10% de lexpend.

ANLISIS DE REGRESIN FORTINO VELA PEN / UAMX
8
iii)

reg math10 lexpend

Source | SS df MS Number of obs = 408
-------------+------------------------------ F( 1, 406) = 12.41
Model | 1329.42517 1 1329.42517 Prob > F = 0.0005
Residual | 43487.7553 406 107.112698 R-squared = 0.0297
-------------+------------------------------ Adj R-squared = 0.0273
Total | 44817.1805 407 110.115923 Root MSE = 10.35

------------------------------------------------------------------------------
math10 | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
lexpend | 11.16439 3.169011 3.52 0.000 4.934677 17.39411
_cons | -69.3411 26.53013 -2.61 0.009 -121.4947 -17.18753
------------------------------------------------------------------------------

expend) log( 11.16439 -69.3411 + = y
n= 408 R
2
=0.0297

iv)
Si el gasto por estudiante aumenta en 10%, en promedio, la tasa de aprobacin en
matemticas se incrementa en aproximadamente 1.116439 (1.1) puntos porcentuales
(ya que as esta medida esta variable). Realmente es muy poco el aumento para el
incremento en el gasto.

v)

reg math10 lexpend
predict yhat
list math10 yhat if yhat>99

Si sera preocupante si las estimaciones del modelo para y rebasaran el valor 100%.
Aqu, sin embargo, no sucede.

0
2
0
4
0
6
0
8
0
p
e
r
c

s
t
u
d
s

p
a
s
s
i
n
g

M
E
A
P

m
a
t
h
8 8.2 8.4 8.6 8.8 9
log of expend


ANLISIS DE REGRESIN FORTINO VELA PEN / UAMX
9
C2.7

i)
use "C:\fvela\econometrics wooldridge\stata\charity.dta", clear
des
sum gift

Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
gift | 4268 7.44447 15.06256 0 250

tab respond

=1 if |
responded |
with gift | Freq. Percent Cum.
------------+-----------------------------------
0 | 2,561 60.00 60.00
1 | 1,707 40.00 100.00
------------+-----------------------------------
Total | 4,268 100.00

ii)
sum mailsyear

Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
mailsyear | 4268 2.049555 .66758 .25 3.5

iii)
reg gift mailsyear

Source | SS df MS Number of obs = 4268
-------------+------------------------------ F( 1, 4266) = 59.65
Model | 13349.7251 1 13349.7251 Prob > F = 0.0000
Residual | 954750.114 4266 223.804528 R-squared = 0.0138
-------------+------------------------------ Adj R-squared = 0.0136
Total | 968099.84 4267 226.880675 Root MSE = 14.96

------------------------------------------------------------------------------
gift | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
mailsyear | 2.649546 .3430598 7.72 0.000 1.976971 3.322122
_cons | 2.01408 .7394696 2.72 0.006 .5643347 3.463825
------------------------------------------------------------------------------

iv)
Por cada correo o envi adicional que por ao se realiza, el monto de los donativos
aumenta aproximadamente en promedio en 2.65 florines.
Si cada envi cuesta un florn, y los donativos aumentan en promedio en 2.65, la
beneficencia si puede esperar una ganancia neta de aproximadamente 2.65-1=1.65
florines.

ANLISIS DE REGRESIN FORTINO VELA PEN / UAMX
10
v)
Los datos muestran que el donativo ms reducido que se realizo fue de 2 florines. Por
otra parte, los resultados del modelo parece indicar que no se puede predecir un monto
de donativo de cero.

tab gift

amount of |
gift, Dutch |
guilders | Freq. Percent Cum.
------------+-----------------------------------
0 | 2,561 60.00 60.00
2 | 25 0.59 60.59
3 | 6 0.14 60.73
4 | 1 0.02 60.75
5 | 158 3.70 64.46
7 | 14 0.33 64.78
8 | 1 0.02 64.81
10 | 702 16.45 81.26
12 | 1 0.02 81.28
15 | 152 3.56 84.84
20 | 86 2.01 86.86
22 | 2 0.05 86.90
24 | 1 0.02 86.93
25 | 387 9.07 95.99
30 | 36 0.84 96.84
35 | 7 0.16 97.00
40 | 4 0.09 97.09
50 | 86 2.01 99.11
55 | 1 0.02 99.13
60 | 1 0.02 99.16
75 | 3 0.07 99.23
90 | 1 0.02 99.25
95 | 1 0.02 99.27
100 | 25 0.59 99.86
120 | 1 0.02 99.88
150 | 1 0.02 99.91
200 | 1 0.02 99.93
250 | 3 0.07 100.00
------------+-----------------------------------
Total | 4,268 100.00

0
5
0
1
0
0
1
5
0
2
0
0
2
5
0
0 1 2 3 4
number of mailings per year
amount of gift, Dutch guilders Fitted values

You might also like