Skip to content

Latest commit

 

History

History
93 lines (75 loc) · 5.48 KB

03 Making Regression Make Sense.md

File metadata and controls

93 lines (75 loc) · 5.48 KB

03 Making Regression Make Sense

3.4 Regression Details

Figure 3-1-2

Completed in Stata, R, Python and Julia

Figure 3-1-2 in Julia

Table 3-3-2

Completed in Stata, R, Python and Julia

Covariate means in the NSW and observational control samples

NSW Treat NSW Control Full CPS-1 Full CPS-3 P-score CPS-1 P-score CPS-3
Age 25.82 25.05 33.23 28.03 25.63 25.97
Years of schooling 10.35 10.09 12.03 10.24 10.49 10.42
Black 0.84 0.83 0.07 0.2 0.96 0.52
Hispanic 0.06 0.11 0.07 0.14 0.03 0.2
Dropout 0.71 0.83 0.3 0.6 0.6 0.63
Married 0.19 0.15 0.71 0.51 0.26 0.29
1974 earnings 2,096 2,107 14,017 5,619 2,821 2,969
1975 earnings 1,532 1,267 13,651 2,466 1,950 1,859
Number of Obs. 185 260 15,992 429 352 157

Figure 3-1-2

Completed in Stata and R

/* Old-fashioned standard errors */

      Source |       SS       df       MS              Number of obs =  329509
-------------+------------------------------           F(  1,329507) =43782.56
       Model |    17808.83     1    17808.83           Prob > F      =  0.0000
    Residual |  134029.045329507  .406756292           R-squared     =  0.1173
-------------+------------------------------           Adj R-squared =  0.1173
       Total |  151837.875329508  .460801788           Root MSE      =  .63777

------------------------------------------------------------------------------
    lwklywge |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        educ |    .070851   .0003386   209.24   0.000     .0701874    .0715147
       _cons |   4.995182   .0044644  1118.88   0.000     4.986432    5.003932
------------------------------------------------------------------------------

/* Robust standard errors */

Linear regression                                      Number of obs =  329509
                                                       F(  1,329507) =34577.15
                                                       Prob > F      =  0.0000
                                                       R-squared     =  0.1173
                                                       Root MSE      =  .63777

------------------------------------------------------------------------------
             |               Robust
    lwklywge |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        educ |    .070851    .000381   185.95   0.000     .0701042    .0715978
       _cons |   4.995182   .0050739   984.49   0.000     4.985238    5.005127
------------------------------------------------------------------------------

/* Old-fashioned standard errors */

      Source |       SS       df       MS              Number of obs =      21
-------------+------------------------------           F(  1,    19) =  485.23
       Model |  1.13497742     1  1.13497742           Prob > F      =  0.0000
    Residual |   .04444186    19  .002339045           R-squared     =  0.9623
-------------+------------------------------           Adj R-squared =  0.9603
       Total |  1.17941928    20  .058970964           Root MSE      =  .04836

------------------------------------------------------------------------------
    lwklywge |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        educ |    .070851   .0032164    22.03   0.000      .064119    .0775831
       _cons |   4.995183   .0424075   117.79   0.000     4.906423    5.083943
------------------------------------------------------------------------------

/* Robust standard errors */

Linear regression                                      Number of obs =      21
                                                       F(  1,    19) =  231.81
                                                       Prob > F      =  0.0000
                                                       R-squared     =  0.9623
                                                       Root MSE      =  .04836

------------------------------------------------------------------------------
             |               Robust
    lwklywge |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        educ |    .070851   .0046535    15.23   0.000     .0611112    .0805908
       _cons |   4.995183   .0479533   104.17   0.000     4.894815     5.09555
------------------------------------------------------------------------------