Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • The ivregress command and the two stage least squares procedure

    Hi,

    I did example 15.5 "Return to education for working women" in Wooldridge's textbook "Introductory econometrics a modern approach" 5th edition.

    First i ran
    Code:
    ivregress 2sls lwage exper expersq (educ= fatheduc motheduc)
    and got the same answer as the book.

    Then i wanted to use two stage lease squares procedure:
    stage 1:
    Code:
    regress educ fatheduc motheduc exper expersq
    predict educ_hat, xb
    stage 2:
    Code:
    regress lwage educ_hat exper expersq
    but the estimated coefficients are not the same, as shown in the table
    Click image for larger version

Name:	table2.png
Views:	1
Size:	10.4 KB
ID:	1462934


    Why is the estimated coefficient for education using Stata command is 0.061, the same as textbook, but 0.057 while using 2 stages? Thank you!
    Attached Files

  • #2
    Here are the data (the first 30 observations)

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input float lwage byte(educ exper) int expersq byte(fatheduc motheduc)
    1.2101537 12 14  196  7 12
     .3285121 12  5   25  7  7
    1.5141377 12 15  225  7 12
    .09212332 12  6   36  7  7
    1.5242722 14  7   49 14 12
      1.55648 12 33 1089  7 14
    2.1202595 16 11  121  7 14
    2.0596342 12 35 1225  3  3
     .7543364 12 24  576  7  7
    1.5448993 12 21  441  7  7
    1.4019216 12 15  225  3 12
    1.5242722 11 14  196  7 14
     .7339532 12  0    0 16 16
     .8183691 12 14  196 10 10
     1.302831 10  6   36  7  7
     .2980284 11  9   81 10 16
    1.1676096 12 20  400  7 10
    1.6438394 12  6   36 12 12
     .6931472 12 23  529  7  7
    2.0219316 12  9   81  7 12
    1.2542475 16  5   25 16 10
    1.2729577 12 11  121 10 12
     1.178655 13 18  324  3  7
     1.178655 12 15  225  7  7
     .7675587 12  4   16  7 12
    1.3318118 17 21  441 14 16
    1.3862944 12 31  961  7  3
    1.5532696 12  9   81  7  3
     1.981815 17  7   49 12 12
    1.7693604 12  7   49 12 12
    end

    Comment


    • #3
      This is from the famous Mroz (1987) data set. In short, the instrumental variable estimator will utilize one estimation sample, so you need to be careful if implementing the estimator in several steps using regress because estimation samples may differ in the presence of missing values.

      Code:
      . use http://fmwww.bc.edu/ec-p/data/wooldridge/mroz, clear
      
      . 
      . regress educ fatheduc motheduc exper expersq if !missing(lwage)
      
            Source |       SS           df       MS      Number of obs   =       428
      -------------+----------------------------------   F(4, 423)       =     28.36
             Model |  471.620998         4   117.90525   Prob > F        =    0.0000
          Residual |  1758.57526       423  4.15738833   R-squared       =    0.2115
      -------------+----------------------------------   Adj R-squared   =    0.2040
             Total |  2230.19626       427  5.22294206   Root MSE        =     2.039
      
      ------------------------------------------------------------------------------
              educ |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
      -------------+----------------------------------------------------------------
          fatheduc |   .1895484   .0337565     5.62   0.000     .1231971    .2558997
          motheduc |    .157597   .0358941     4.39   0.000      .087044    .2281501
             exper |   .0452254   .0402507     1.12   0.262    -.0338909    .1243417
           expersq |  -.0010091   .0012033    -0.84   0.402    -.0033744    .0013562
             _cons |    9.10264   .4265614    21.34   0.000     8.264196    9.941084
      ------------------------------------------------------------------------------
      
      . 
      . predict educhat
      (option xb assumed; fitted values)
      
      . 
      . regress lwage educhat exper expersq
      
            Source |       SS           df       MS      Number of obs   =       428
      -------------+----------------------------------   F(3, 424)       =      7.40
             Model |  11.1178292         3  3.70594308   Prob > F        =    0.0001
          Residual |  212.209622       424  .500494392   R-squared       =    0.0498
      -------------+----------------------------------   Adj R-squared   =    0.0431
             Total |  223.327451       427  .523015108   Root MSE        =    .70746
      
      ------------------------------------------------------------------------------
             lwage |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
      -------------+----------------------------------------------------------------
           educhat |   .0613966   .0329624     1.86   0.063    -.0033933    .1261866
             exper |   .0441704   .0140844     3.14   0.002     .0164865    .0718543
           expersq |   -.000899   .0004212    -2.13   0.033    -.0017268   -.0000711
             _cons |   .0481003   .4197565     0.11   0.909    -.7769624     .873163
      ------------------------------------------------------------------------------
      
      . 
      . ivregress 2sls lwage exper expersq (educ= fatheduc motheduc)
      
      Instrumental variables (2SLS) regression          Number of obs   =        428
                                                        Wald chi2(3)    =      24.65
                                                        Prob > chi2     =     0.0000
                                                        R-squared       =     0.1357
                                                        Root MSE        =     .67155
      
      ------------------------------------------------------------------------------
             lwage |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
      -------------+----------------------------------------------------------------
              educ |   .0613966   .0312895     1.96   0.050     .0000704    .1227228
             exper |   .0441704   .0133696     3.30   0.001     .0179665    .0703742
           expersq |   -.000899   .0003998    -2.25   0.025    -.0016826   -.0001154
             _cons |   .0481003    .398453     0.12   0.904    -.7328532    .8290538
      ------------------------------------------------------------------------------
      Instrumented:  educ
      Instruments:   exper expersq fatheduc motheduc
      
      .

      Comment


      • #4
        Thank you so much. Now i got the right answer.

        Comment

        Working...
        X