Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Formas cuadrticas
Cambios de escala (ya vimos)
Variables ficticias: variables explicativas binarias
Formas cuadrticas
Cambios de escala
Variables ficticias: variables explicativas binarias
Number of obs
F( 1, 36373)
Prob > F
R-squared
Adj R-squared
Root MSE
=
36375
= 5170.28
= 0.0000
= 0.1245
= 0.1244
= 6.4e+05
-----------------------------------------------------------------------------sal |
Coef.
Std. Err.
t
P>|t|
[95% Conf. Interval]
-------------+---------------------------------------------------------------esc |
63543.95
883.7253
71.90
0.000
61811.82
65276.08
_cons | -210733.3
10171.36
-20.72
0.000
-230669.5
-190797.2
------------------------------------------------------------------------------
Number of obs
F( 1, 35992)
Prob > F
R-squared
Adj R-squared
Root MSE
=
35994
= 8398.49
= 0.0000
= 0.1892
= 0.1892
= .68288
-----------------------------------------------------------------------------lsal |
Coef.
Std. Err.
t
P>|t|
[95% Conf. Interval]
-------------+---------------------------------------------------------------lesc |
.7842882
.0085581
91.64
0.000
.7675141
.8010622
_cons |
10.91641
.0202144
540.03
0.000
10.87679
10.95603
------------------------------------------------------------------------------
Forma semi-logartmica
ln(W)= 0+1 Educ+
Interpretacin aproximada coeficiente: variacin
porcentual en la variable Y ante un cambio en una
unidad en X.
Se conoce como semi-elasticidad.
Veamos un ejemplo.
Number of obs
F( 1, 36373)
Prob > F
R-squared
Adj R-squared
Root MSE
=
36375
=12556.64
= 0.0000
= 0.2566
= 0.2566
= .65481
-----------------------------------------------------------------------------lsal |
Coef.
Std. Err.
t
P>|t|
[95% Conf. Interval]
-------------+---------------------------------------------------------------esc |
.1016544
.0009072
112.06
0.000
.0998763
.1034325
_cons |
11.62769
.0104412 1113.63
0.000
11.60723
11.64816
------------------------------------------------------------------------------
% y 100exp( 1x) 1
^
Cambios de escala
Variables ficticias: variables explicativas binarias
Interacciones entre variables continuas-binarias y entre
variables binarias
10
Ejemplo
ln W= 0+1Educ+2Educ2+
y 0 1 Educ 2 Educ 2
y 2 Educ Educ
1 + 22
Que no es constante, sino que depende de Educ
Number of obs
F( 2, 36372)
Prob > F
R-squared
Adj R-squared
Root MSE
=
36375
= 7516.52
= 0.0000
= 0.2924
= 0.2924
= .63885
-----------------------------------------------------------------------------lsal |
Coef.
Std. Err.
t
P>|t|
[95% Conf. Interval]
-------------+---------------------------------------------------------------esc | -.0439116
.003506
-12.52
0.000
-.0507835
-.0370397
esc2 |
.0070778
.000165
42.91
0.000
.0067545
.0074011
_cons |
12.27233
.0181514
676.11
0.000
12.23675
12.30791
------------------------------------------------------------------------------
15
14
Linear prediction
13
12
0
10
aos de escolaridad
15
20
14
16
14
12
10
0
10
aos de escolaridad
Linear prediction
15
20
lsal
15
Number of obs
F( 3, 36371)
Prob > F
R-squared
Adj R-squared
Root MSE
=
36375
= 5068.19
= 0.0000
= 0.2948
= 0.2947
= .63779
-----------------------------------------------------------------------------lsal |
Coef.
Std. Err.
t
P>|t|
[95% Conf. Interval]
-------------+---------------------------------------------------------------esc |
.0435572
.0086684
5.02
0.000
.026567
.0605475
esc2 | -.0031179
.0009389
-3.32
0.001
-.0049582
-.0012775
esc3 |
.0003388
.0000307
11.03
0.000
.0002786
.0003991
_cons |
12.08448
.0248685
485.94
0.000
12.03574
12.13323
------------------------------------------------------------------------------
15
14
13
12
0
10
aos de escolaridad
Linear prediction
Yhat Modelo lineal
15
20
Formas cuadrticas
Cambios de escala
Variables ficticias: variables explicativas binarias
18
Formas cuadrticas
Cambios de escala
Variables ficticias: variables explicativas binarias
20
Number of obs
F( 2, 60705)
Prob > F
R-squared
Adj R-squared
Root MSE
=
60708
=12598.87
= 0.0000
= 0.2933
= 0.2933
= .67481
-----------------------------------------------------------------------------lsal |
Coef.
Std. Err.
t
P>|t|
[95% Conf. Interval]
-------------+---------------------------------------------------------------esc |
.1061411
.0007249
146.43
0.000
.1047204
.1075618
mujer | -.4229015
.0056155
-75.31
0.000
-.4339079
-.4118951
_cons |
11.57892
.0086369 1340.63
0.000
11.562
11.59585
------------------------------------------------------------------------------
Modelo:
lnW=0+1Ed+2Sexo+
Aproximadamente 2 mide la diferencia porcentual entre el salario predicho para hombres y
mujeres
Especficamente indica que las mujeres ganan mensualmente un 42% menos que los hombres
(clculo exacto: 34%)
% y 100exp( ) 1
^
Number of obs
F( 2, 60705)
Prob > F
R-squared
Adj R-squared
Root MSE
=
60708
= 4720.80
= 0.0000
= 0.1346
= 0.1346
= 5.6e+05
-----------------------------------------------------------------------------sal |
Coef.
Std. Err.
t
P>|t|
[95% Conf. Interval]
-------------+---------------------------------------------------------------esc |
55573.25
599.6599
92.67
0.000
54397.91
56748.58
mujer | -177124.5
4645.571
-38.13
0.000
-186229.8
-168019.1
_cons | -124094.9
7145.121
-17.37
0.000
-138099.4
-110090.4
------------------------------------------------------------------------------
Modelo:
W=0+1Ed+2Sexo+
Aproximadamente 2 mide la diferencia en el salario predicho en $ entre
hombres y mujeres. Especficamente indica que las mujeres ganan
mensualmente $177.124 menos que los hombres.
1000000
500000
-500000
10
aos de escolaridad
Mujer
15
Hombre
Modelo en niveles
20
1000000
500000
-500000
10
aos de escolaridad
Mujer
15
Hombre
Modelo en niveles
20
Number of obs
F( 2, 60705)
Prob > F
R-squared
Adj R-squared
Root MSE
=
60708
= 4720.80
= 0.0000
= 0.1346
= 0.1346
= 5.6e+05
-----------------------------------------------------------------------------sal |
Coef.
Std. Err.
t
P>|t|
[95% Conf. Interval]
-------------+---------------------------------------------------------------esc_12 |
55573.25
599.6599
92.67
0.000
54397.91
56748.58
mujer | -177124.5
4645.571
-38.13
0.000
-186229.8
-168019.1
_cons |
542784.1
3004.501
180.66
0.000
536895.2
548672.9
------------------------------------------------------------------------------
Number of obs
F( 2, 60705)
Prob > F
R-squared
Adj R-squared
Root MSE
=
60708
= 4720.80
= 0.0000
= 0.1346
= 0.1346
= 5.6e+05
-----------------------------------------------------------------------------sal |
Coef.
Std. Err.
t
P>|t|
[95% Conf. Interval]
-------------+---------------------------------------------------------------esc_12 |
55573.25
599.6599
92.67
0.000
54397.91
56748.58
mujer |
365659.6
3585.735
101.98
0.000
358631.6
372687.7
hombre |
542784.1
3004.501
180.66
0.000
536895.2
548672.9
------------------------------------------------------------------------------
Source |
SS
df
MS
-------------+-----------------------------Model | 11474.1094
2 5737.05472
Residual |
27642.788 60705 .455362622
-------------+-----------------------------Total | 39116.8974 60707 .644355633
Number of obs
F( 2, 60705)
Prob > F
R-squared
Adj R-squared
Root MSE
=
60708
=12598.87
= 0.0000
= 0.2933
= 0.2933
= .67481
-----------------------------------------------------------------------------lnsal |
Coef.
Std. Err.
t
P>|t|
[95% Conf. Interval]
-------------+---------------------------------------------------------------esc |
.1061411
.0007249
146.43
0.000
.1047204
.1075618
mujer | -.4229015
.0056155
-75.31
0.000
-.4339079
-.4118951
_cons |
11.57892
.0086369 1340.63
0.000
11.562
11.59585
Source |
SS
df
MS
-------------+-----------------------------Model | 11474.1094
2 5737.05472
Residual |
27642.788 60705 .455362622
-------------+-----------------------------Total | 39116.8974 60707 .644355633
Number of obs
F( 2, 60705)
Prob > F
R-squared
Adj R-squared
Root MSE
=
60708
=12598.87
= 0.0000
= 0.2933
= 0.2933
= .67481
-----------------------------------------------------------------------------lnsal |
Coef.
Std. Err.
t
P>|t|
[95% Conf. Interval]
-------------+---------------------------------------------------------------esc |
.1061411
.0007249
146.43
0.000
.1047204
.1075618
hombre |
.4229015
.0056155
75.31
0.000
.4118951
.4339079
_cons |
11.15602
.0094734 1177.62
0.000
11.13746
11.17459
. disp 11.57892-.4229015
11.156019
Otra opcin
W= 1Ed+ 2Mujer+3Hombre+
donde Mujer=1 si es mujer, 0 en cualquier otro caso
En este caso 1= 1=1;
2= 2-3; 2= 3-2;
3 = 0 ; 3 = 0 +2;
Lo comprobamos nuevamente? Corriendo esta regresin, vemos
que obtenemos directamente el salario esperado para las
mujeres y para los hombres. Si queremos hacer la diferencia
tenemos que restar estos dos coeficientes.
Number of obs
F( 2, 60705)
Prob > F
R-squared
Adj R-squared
Root MSE
=
60708
=12598.87
= 0.0000
= 0.2933
= 0.2933
= .67481
-----------------------------------------------------------------------------lnsal |
Coef.
Std. Err.
t
P>|t|
[95% Conf. Interval]
-------------+---------------------------------------------------------------esc |
.1061411
.0007249
146.43
0.000
.1047204
.1075618
hombre |
11.57892
.0086369 1340.63
0.000
11.562
11.59585
mujer |
11.15602
.0094734 1177.62
0.000
11.13746
11.17459
------------------------------------------------------------------------------
. test hombre=mujer
( 1)
hombre - mujer = 0
F(
1, 60705) = 5671.56
Prob > F =
0.0000
. disp 5671.56^(1/2)
75.30976
. reg sal D1 D2 D3
Source |
SS
df
MS
-------------+-----------------------------Model | 3.0663e+15
3 1.0221e+15
Residual | 1.8795e+16 60704 3.0961e+11
-------------+-----------------------------Total | 2.1861e+16 60707 3.6010e+11
Number of obs
F( 3, 60704)
Prob > F
R-squared
Adj R-squared
Root MSE
=
60708
= 3301.23
= 0.0000
= 0.1403
= 0.1402
= 5.6e+05
-----------------------------------------------------------------------------sal |
Coef.
Std. Err.
t
P>|t|
[95% Conf. Interval]
-------------+---------------------------------------------------------------D1 |
52990.13
7462.601
7.10
0.000
38363.41
67616.85
D2 |
195448
6789.003
28.79
0.000
182141.5
208754.4
D3 |
802231.2
9102.069
88.14
0.000
784391.1
820071.3
_cons |
229004.3
5979.268
38.30
0.000
217284.9
240723.7
------------------------------------------------------------------------------
Formas cuadrticas
Cambios de escala
Variables ficticias
38
Number of obs
F( 3, 60704)
Prob > F
R-squared
Adj R-squared
Root MSE
=
60708
= 3250.18
= 0.0000
= 0.1384
= 0.1384
= 5.6e+05
-----------------------------------------------------------------------------sal |
Coef.
Std. Err.
t
P>|t|
[95% Conf. Interval]
-------------+---------------------------------------------------------------esc_12 |
63543.95
771.7105
82.34
0.000
62031.4
65056.51
mujer | -190615.3
4708.23
-40.49
0.000
-199843.5
-181387.2
interac | -19985.33
1221.973
-16.35
0.000
-22380.4
-17590.25
_cons |
551794.1
3048.125
181.03
0.000
545819.8
557768.4
------------------------------------------------------------------------------
Number of obs
F( 3, 60704)
Prob > F
R-squared
Adj R-squared
Root MSE
=
60708
= 8426.37
= 0.0000
= 0.2940
= 0.2940
= .67449
-----------------------------------------------------------------------------lsal |
Coef.
Std. Err.
t
P>|t|
[95% Conf. Interval]
-------------+---------------------------------------------------------------esc_12 |
.1016544
.0009344
108.79
0.000
.0998229
.1034859
mujer | -.4153075
.005701
-72.85
0.000
-.4264816
-.4041335
interac |
.0112497
.0014796
7.60
0.000
.0083496
.0141498
_cons |
12.84755
.0036909 3480.89
0.000
12.84031
12.85478
------------------------------------------------------------------------------
Number of obs
F( 4, 60703)
Prob > F
R-squared
Adj R-squared
Root MSE
=
60708
= 2461.07
= 0.0000
= 0.1395
= 0.1395
= 5.6e+05
-----------------------------------------------------------------------------sal |
Coef.
Std. Err.
t
P>|t|
[95% Conf. Interval]
-------------+---------------------------------------------------------------esc_12 |
54377
601.3797
90.42
0.000
53198.29
55555.7
mujer | -170968.6
5049.012
-33.86
0.000
-180864.7
-161072.6
RM |
139748.1
8458.006
16.52
0.000
123170.4
156325.8
mujer_RM | -56381.59
12681.38
-4.45
0.000
-81237.14
-31526.04
_cons |
521922.8
3244.053
160.89
0.000
515564.5
528281.2
------------------------------------------------------------------------------
43
1000000 1500000
500000
-500000
-10
-5
0
esc_12
Hombre y no en RM
Hombre y en RM
10
Mujer y no en RM
Mujer y en RM
44
Formas cuadrticas
Cambios de escala
Variables ficticias
45
Ejemplo:
desempleado =0 + 1educ + 2edad + 3Mujer+u
La variable dependiente desempleado toma el
valor 1 si la persona est desempleada y el valor
0 si la persona est trabajando.
Cmo interpretamos los coeficientes de este
modelo?
46
Number of obs
F( 3, 85378)
Prob > F
R-squared
Adj R-squared
Root MSE
=
=
=
=
=
=
85382
876.97
0.0000
0.0299
0.0299
.2573
-----------------------------------------------------------------------------des |
Coef.
Std. Err.
t
P>|t|
[95% Conf. Interval]
-------------+---------------------------------------------------------------esc | -.0030876
.0002431
-12.70
0.000
-.003564
-.0026112
mujer |
.0270465
.0018089
14.95
0.000
.023501
.0305919
edad | -.0032824
.0000677
-48.51
0.000
-.003415
-.0031498
_cons |
.2299453
.0045037
51.06
0.000
.2211181
.2387724
------------------------------------------------------------------------------
47
Ingeniera Comercial