------------------------------------------------------------------------------------------
name: <unnamed>
log: C:\Users\Michael\Documents\newer web pages\soc_meth_proj3\fall_2014_logs\clas
> s17.log
log type: text
opened on: 17 Nov 2014, 10:49:50
. *class begins here. Compare to my web notes on “what changes and what doesn’t change in regression”
. codebook metro
---------------------------------------------------------------------------
metro Metropolitan central city status
---------------------------------------------------------------------------
type: numeric (byte)
label: metrolbl
range: [0,4] units: 1
unique values: 5 missing .: 0/133710
tabulation: Freq. Numeric Label
340 0 Not identifiable
29658 1 Not in metro area
32481 2 Central city
51468 3 Outside central city
19763 4 Central city status unknown
. regress incwage male ib3.metro yrsed lawyers if lawyers==1 | sociologists==1
Source | SS df MS Number of obs = 447
-------------+------------------------------ F( 6, 440) = 3.75
Model | 1.0236e+11 6 1.7061e+10 Prob > F = 0.0012
Residual | 2.0010e+12 440 4.5477e+09 R-squared = 0.0487
-------------+------------------------------ Adj R-squared = 0.0357
Total | 2.1034e+12 446 4.7160e+09 Root MSE = 67437
-----------------------------------------------------------------------------------
incwage | Coef. Std. Err. t P>|t| [95% Conf. Interval]
------------------+----------------------------------------------------------------
male | 21822.54 7019.121 3.11 0.002 8027.373 35617.71
|
metro |
Not in metro a.. | -35179.04 11893.77 -2.96 0.003 -58554.7 -11803.37
Central city | -866.6961 6990.648 -0.12 0.901 -14605.91 12872.52
Central city s.. | -16129.4 12804.46 -1.26 0.208 -41294.9 9036.1
|
yrsed | 10526.86 7112.556 1.48 0.140 -3451.948 24505.66
lawyers | 14971.23 28060.59 0.53 0.594 -40178.21 70120.67
_cons | -130163.4 124066.3 -1.05 0.295 -373999.6 113672.8
-----------------------------------------------------------------------------------
* Note how the change from male to female reverses the Coef and the T-statistic, but SE remains the same.
. regress incwage female ib3.metro yrsed lawyers if lawyers==1 | sociologists==1
Source | SS df MS Number of obs = 447
-------------+------------------------------ F( 6, 440) = 3.75
Model | 1.0236e+11 6 1.7061e+10 Prob > F = 0.0012
Residual | 2.0010e+12 440 4.5477e+09 R-squared = 0.0487
-------------+------------------------------ Adj R-squared = 0.0357
Total | 2.1034e+12 446 4.7160e+09 Root MSE = 67437
-----------------------------------------------------------------------------------
incwage | Coef. Std. Err. t P>|t| [95% Conf. Interval]
------------------+----------------------------------------------------------------
female | -21822.54 7019.121 -3.11 0.002 -35617.71 -8027.373
|
metro |
Not in metro a.. | -35179.04 11893.77 -2.96 0.003 -58554.7 -11803.37
Central city | -866.6961 6990.648 -0.12 0.901 -14605.91 12872.52
Central city s.. | -16129.4 12804.46 -1.26 0.208 -41294.9 9036.1
|
yrsed | 10526.86 7112.556 1.48 0.140 -3451.948 24505.66
lawyers | 14971.23 28060.59 0.53 0.594 -40178.21 70120.67
_cons | -108340.8 124714.3 -0.87 0.385 -353450.7 136769
-----------------------------------------------------------------------------------
*And metro 2 compared to metro 1:
. lincom 2.metro-1.metro
( 1) - 1.metro + 2.metro = 0
------------------------------------------------------------------------------
incwage | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
(1) | 34312.34 12062.81 2.84 0.005 10604.45 58020.23
------------------------------------------------------------------------------
. codebook metro
------------------------------------------------------------------------------------
metro Metropolitan central city status
------------------------------------------------------------------------------------
type: numeric (byte)
label: metrolbl
range: [0,4] units: 1
unique values: 5 missing .: 0/133710
tabulation: Freq. Numeric Label
340 0 Not identifiable
29658 1 Not in metro area
32481 2 Central city
51468 3 Outside central city
19763 4 Central city status unknown
* Now if we change metro 1 to be the comparison category, we see we can recover the same coefficient and T-statistic as above in the comparison of metro 2 to metro 1.
. regress incwage female ib1.metro yrsed lawyers if lawyers==1 | sociologists==1
Source | SS df MS Number of obs = 447
-------------+------------------------------ F( 6, 440) = 3.75
Model | 1.0236e+11 6 1.7061e+10 Prob > F = 0.0012
Residual | 2.0010e+12 440 4.5477e+09 R-squared = 0.0487
-------------+------------------------------ Adj R-squared = 0.0357
Total | 2.1034e+12 446 4.7160e+09 Root MSE = 67437
-----------------------------------------------------------------------------------
incwage | Coef. Std. Err. t P>|t| [95% Conf. Interval]
------------------+----------------------------------------------------------------
female | -21822.54 7019.121 -3.11 0.002 -35617.71 -8027.373
|
metro |
Central city | 34312.34 12062.81 2.84 0.005 10604.45 58020.23
Outside centra.. | 35179.04 11893.77 2.96 0.003 11803.37 58554.7
Central city s.. | 19049.64 16054.28 1.19 0.236 -12502.96 50602.24
|
yrsed | 10526.86 7112.556 1.48 0.140 -3451.948 24505.66
lawyers | 14971.23 28060.59 0.53 0.594 -40178.21 70120.67
_cons | -143519.9 125052.8 -1.15 0.252 -389295 102255.2
-----------------------------------------------------------------------------------
. regress incwage female ib1.metro yrsed lawyers if lawyers==1 | sociologists==1
Source | SS df MS Number of obs = 447
-------------+------------------------------ F( 6, 440) = 3.75
Model | 1.0236e+11 6 1.7061e+10 Prob > F = 0.0012
Residual | 2.0010e+12 440 4.5477e+09 R-squared = 0.0487
-------------+------------------------------ Adj R-squared = 0.0357
Total | 2.1034e+12 446 4.7160e+09 Root MSE = 67437
-----------------------------------------------------------------------------------
incwage | Coef. Std. Err. t P>|t| [95% Conf. Interval]
------------------+----------------------------------------------------------------
female | -21822.54 7019.121 -3.11 0.002 -35617.71 -8027.373
|
metro |
Central city | 34312.34 12062.81 2.84 0.005 10604.45 58020.23
Outside centra.. | 35179.04 11893.77 2.96 0.003 11803.37 58554.7
Central city s.. | 19049.64 16054.28 1.19 0.236 -12502.96 50602.24
|
yrsed | 10526.86 7112.556 1.48 0.140 -3451.948 24505.66
lawyers | 14971.23 28060.59 0.53 0.594 -40178.21 70120.67
_cons | -143519.9 125052.8 -1.15 0.252 -389295 102255.2
-----------------------------------------------------------------------------------
* Here below, even though the lawyer coefficient is still compared to sociologists, the addition of the nurses changes the gender, metro, and education coefficients, and therefore the lawyer-sociologist comparison as well.
. regress incwage female ib1.metro yrsed lawyers nurses if lawyers==1 | sociologists==1 |nurses==1
Source | SS df MS Number of obs = 1413
-------------+------------------------------ F( 8, 1404) = 34.53
Model | 4.8689e+11 8 6.0862e+10 Prob > F = 0.0000
Residual | 2.4744e+12 1404 1.7624e+09 R-squared = 0.1644
-------------+------------------------------ Adj R-squared = 0.1597
Total | 2.9612e+12 1412 2.0972e+09 Root MSE = 41980
-----------------------------------------------------------------------------------
incwage | Coef. Std. Err. t P>|t| [95% Conf. Interval]
------------------+----------------------------------------------------------------
female | -17382.34 3411.092 -5.10 0.000 -24073.73 -10690.96
|
metro |
Not identifiable | 9055.471 21169.8 0.43 0.669 -32472.38 50583.33
Central city | 11008.95 3637.772 3.03 0.003 3872.901 18145.01
Outside centra.. | 11563.4 3232.891 3.58 0.000 5221.585 17905.22
Central city s.. | 5087.729 3985.776 1.28 0.202 -2730.99 12906.45
|
yrsed | 1901.495 832.8057 2.28 0.023 267.8173 3535.172
lawyers | 22910.76 17329.64 1.32 0.186 -11084.01 56905.54
nurses | 2144.799 17262.35 0.12 0.901 -31717.97 36007.57
_cons | 14233.9 22357.43 0.64 0.524 -29623.66 58091.46
-----------------------------------------------------------------------------------
* But, revisiting an item from HW2, if we add nurses to the mix without any additional variables, the lawyer-sociologist coefficient stays the same, though the standard error and t-statistic change.
. regress incwage lawyers if lawyers==1 | sociologists==1
Source | SS df MS Number of obs = 447
-------------+------------------------------ F( 1, 445) = 1.33
Model | 6.2663e+09 1 6.2663e+09 Prob > F = 0.2495
Residual | 2.0971e+12 445 4.7125e+09 R-squared = 0.0030
-------------+------------------------------ Adj R-squared = 0.0007
Total | 2.1034e+12 446 4.7160e+09 Root MSE = 68648
------------------------------------------------------------------------------
incwage | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
lawyers | 32535.99 28215.44 1.15 0.249 -22916.07 87988.05
_cons | 41508.33 28025.43 1.48 0.139 -13570.31 96586.97
------------------------------------------------------------------------------
. regress incwage lawyers nurses if lawyers==1 | sociologists==1 |nurses==1
Source | SS df MS Number of obs = 1413
-------------+------------------------------ F( 2, 1410) = 111.34
Model | 4.0387e+11 2 2.0194e+11 Prob > F = 0.0000
Residual | 2.5574e+12 1410 1.8137e+09 R-squared = 0.1364
-------------+------------------------------ Adj R-squared = 0.1352
Total | 2.9612e+12 1412 2.0972e+09 Root MSE = 42588
------------------------------------------------------------------------------
incwage | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
lawyers | 32535.99 17504.37 1.86 0.063 -1801.409 66873.4
nurses | -3971.481 17440.4 -0.23 0.820 -38183.41 30240.45
_cons | 41508.33 17386.49 2.39 0.017 7402.162 75614.5
------------------------------------------------------------------------------
. regress incwage female ib1.metro yrsed lawyers if lawyers==1 | sociologists==1
Source | SS df MS Number of obs = 447
-------------+------------------------------ F( 6, 440) = 3.75
Model | 1.0236e+11 6 1.7061e+10 Prob > F = 0.0012
Residual | 2.0010e+12 440 4.5477e+09 R-squared = 0.0487
-------------+------------------------------ Adj R-squared = 0.0357
Total | 2.1034e+12 446 4.7160e+09 Root MSE = 67437
-----------------------------------------------------------------------------------
incwage | Coef. Std. Err. t P>|t| [95% Conf. Interval]
------------------+----------------------------------------------------------------
female | -21822.54 7019.121 -3.11 0.002 -35617.71 -8027.373
|
metro |
Central city | 34312.34 12062.81 2.84 0.005 10604.45 58020.23
Outside centra.. | 35179.04 11893.77 2.96 0.003 11803.37 58554.7
Central city s.. | 19049.64 16054.28 1.19 0.236 -12502.96 50602.24
|
yrsed | 10526.86 7112.556 1.48 0.140 -3451.948 24505.66
lawyers | 14971.23 28060.59 0.53 0.594 -40178.21 70120.67
_cons | -143519.9 125052.8 -1.15 0.252 -389295 102255.2
-----------------------------------------------------------------------------------
* And note that the effect of one month’s ed is the 1/12 the effect of one year of education, but the t-statistic is the same.
. regress incwage female ib1.metro months_ed lawyers if lawyers==1 | sociologists==1
Source | SS df MS Number of obs = 447
-------------+------------------------------ F( 6, 440) = 3.75
Model | 1.0236e+11 6 1.7061e+10 Prob > F = 0.0012
Residual | 2.0010e+12 440 4.5477e+09 R-squared = 0.0487
-------------+------------------------------ Adj R-squared = 0.0357
Total | 2.1034e+12 446 4.7160e+09 Root MSE = 67437
-----------------------------------------------------------------------------------
incwage | Coef. Std. Err. t P>|t| [95% Conf. Interval]
------------------+----------------------------------------------------------------
female | -21822.54 7019.121 -3.11 0.002 -35617.71 -8027.373
|
metro |
Central city | 34312.34 12062.81 2.84 0.005 10604.45 58020.23
Outside centra.. | 35179.04 11893.77 2.96 0.003 11803.37 58554.7
Central city s.. | 19049.64 16054.28 1.19 0.236 -12502.96 50602.24
|
months_ed | 877.2381 592.713 1.48 0.140 -287.6623 2042.138
lawyers | 14971.23 28060.59 0.53 0.594 -40178.21 70120.67
_cons | -143519.9 125052.8 -1.15 0.252 -389295 102255.2
-----------------------------------------------------------------------------------
. log close
name: <unnamed>
log: C:\Users\Michael\Documents\newer web pages\soc_meth_proj3\fall_2014_log
> s\class17.log
log type: text
closed on: 17 Nov 2014, 13:39:45
------------------------------------------------------------------------------------