Announcement

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

  • Mroz data set, example 16.5 in "Introductory Econometrics fifth edition" and SEM command

    Hi,
    I use Mroz data set to run example 16.5 in Introductory Econometrics fifth edition (Wooldridge).

    By 2SLS:
    Code:
    ivregress 2sls hours (lwage=exper expersq) educ age kidslt6 nwifeinc
    I got the same estimated coefficients as the textbook.

    By 3SLS:
    Code:
    reg3 (hours lwage age educ nwifeinc kidslt6 ) (lwage hours educ exper expersq)
    The results are slightly different, i think it is because the correlation between two error terms of the structural equations is taken into account. Is it correct?

    But when i try SEM:
    Code:
    sem (hours<-lwage age educ nwifeinc kidslt6 ) (lwage<-hours educ exper expersq), cov(e.hours*e.lwage)
    it doesn't converge, why? How to use SEM to do the regression?

  • #2
    I want to compare the results from 2SLS, 3SLS, and SEM.
    I notice that i can use SEM without cov:
    Code:
    sem (hours<-lwage age educ nwifeinc kidslt6 ) (lwage<-hours educ exper expersq)
    but the results are quit different from using reg3; coefficient of hours the demand function becomes significant, while in reg3 it is not. WHy?

    Comment


    • #3
      To make it clear, the structural equations are
      Click image for larger version

Name:	1.jpeg
Views:	1
Size:	81.5 KB
ID:	1463630


      The first one is the labour supply equation and the second one is the labour demand equation or the wage offer equation.

      Comment


      • #4
        Your question was cross-posted with https://www.statalist.org/forums/for...3467-about-sem

        I dont have "16.5 in Introductory Econometrics fifth edition (Wooldridge)" so I cannot reproduce or investigate your example.

        From your initial post, it's not clear why you specified your SEM in the way you did. For example, why did you include 'cov(e.hours*e.lwage)' (why not some other covariance -- did you use -estat mindicies- to determine this? how did you select this as the cov() ? ).

        There lots of reasons for non-convergence for SEM. A great place to start is pgs 114-124 of the Stata SEM manual. You can try building your model step by step to find the failure point or specifying a simpler model, increasing the iter() to give it more than 1600 iter to converge, provide new start values (sometimes based on a simpler, converging model), check for collinearity issues, etc that might => non-positive definiteness.

        (Finally, this reads as potentially a HW question - if so, you should be clear about this in your OP.)
        Last edited by eric_a_booth; 26 Sep 2018, 16:31.
        Eric A. Booth | Senior Director of Research | Far Harbor | Austin TX

        Comment


        • #5
          Perhaps this is the source of the mroz data?

          https://ideas.repec.org/p/boc/bocins/mroz.html

          And rather than the question "why does this model not converge?" consider instead "why does this model continually produce the same implausible value for the log likelihood"?

          Have you read and followed on the advice in "intro 12 — Convergence problems and how to solve them" in the Stata Structural Equation Modeling Reference PDF include in your Stata installation and accessible through Stata's Help menu?
          Code:
          . sem (hours<-lwage age educ nwifeinc kidslt6 ) (lwage<-hours educ exper expersq) , cov(e.hours*
          > e.lwage)
          (325 observations with missing values excluded)
          
          Endogenous variables
          
          Observed:  hours lwage
          
          Exogenous variables
          
          Observed:  age educ nwifeinc kidslt6 exper expersq
          
          Fitting target model:
          
          Iteration 0:   log likelihood = -11993.409  
          Iteration 1:   log likelihood =  6.248e+14  (not concave)
          Iteration 2:   log likelihood =  6.248e+14  (not concave)
          Iteration 3:   log likelihood =  6.248e+14  (not concave)
          ...
          Last edited by William Lisowski; 26 Sep 2018, 17:40.

          Comment


          • #6
            See Paul Allison's blog entry at

            https://statisticalhorizons.com/iv-in-sem

            I think the code should be more like

            Code:
            . use https://www3.nd.edu/~rwilliam/statafiles/mroz.dta, clear
            
            . ivregress 2sls hours (lwage=exper ) educ age kidslt6 nwifeinc
            
            Instrumental variables (2SLS) regression          Number of obs   =        428
                                                              Wald chi2(5)    =      14.99
                                                              Prob > chi2     =     0.0104
                                                              R-squared       =          .
                                                              Root MSE        =     1465.4
            
            ------------------------------------------------------------------------------
                   hours |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
            -------------+----------------------------------------------------------------
                   lwage |   1852.411    567.199     3.27   0.001     740.7212      2964.1
                    educ |  -206.7184   69.40184    -2.98   0.003    -342.7435   -70.69332
                     age |  -8.891157   10.22776    -0.87   0.385     -28.9372    11.15489
                 kidslt6 |  -181.2068   198.9487    -0.91   0.362    -571.1391    208.7255
                nwifeinc |  -10.72081   7.187145    -1.49   0.136    -24.80735    3.365739
                   _cons |   2316.671   630.8575     3.67   0.000     1080.213    3553.129
            ------------------------------------------------------------------------------
            Instrumented:  lwage
            Instruments:   educ age kidslt6 nwifeinc exper
            
            . sem (hours <- lwage educ age kidslt6 nwifeinc) (lwage <- exper  educ age kidslt6 nwifeinc), cov(e.hours*e.lwage) nolog
            (325 observations with missing values excluded)
            
            Endogenous variables
            
            Observed:  hours lwage
            
            Exogenous variables
            
            Observed:  educ age kidslt6 nwifeinc exper
            
            Structural equation model                       Number of obs     =        428
            Estimation method  = ml
            Log likelihood     = -9499.7155
            
            -------------------------------------------------------------------------------------
                                |                 OIM
                                |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
            --------------------+----------------------------------------------------------------
            Structural          |
              hours             |
                          lwage |   1852.411    567.199     3.27   0.001     740.7212      2964.1
                           educ |  -206.7184   69.40184    -2.98   0.003    -342.7435   -70.69332
                            age |  -8.891157   10.22776    -0.87   0.385     -28.9372    11.15489
                        kidslt6 |  -181.2068   198.9487    -0.91   0.362    -571.1391    208.7255
                       nwifeinc |  -10.72081   7.187145    -1.49   0.136    -24.80735    3.365739
                          _cons |   2316.671   630.8575     3.67   0.000     1080.213    3553.129
              ------------------+----------------------------------------------------------------
              lwage             |
                           educ |   .1026255   .0148815     6.90   0.000     .0734584    .1317926
                            age |  -.0044549    .005075    -0.88   0.380    -.0144016    .0054919
                        kidslt6 |  -.0669334    .087798    -0.76   0.446    -.2390143    .1051475
                       nwifeinc |   .0058469   .0032939     1.78   0.076    -.0006089    .0123028
                          exper |   .0183417   .0047109     3.89   0.000     .0091085     .027575
                          _cons |   -.262441   .2671061    -0.98   0.326    -.7859593    .2610773
            --------------------+----------------------------------------------------------------
                    var(e.hours)|    2147446   970311.2                      885751.1     5206343
                    var(e.lwage)|    .440337   .0301008                      .3851219    .5034683
            --------------------+----------------------------------------------------------------
            cov(e.hours,e.lwage)|   -845.508   257.4083    -3.28   0.001    -1350.019    -340.997
            -------------------------------------------------------------------------------------
            Note: The LR test of model vs. saturated is not reported because the fitted
                  model is not full rank.
            Note that, in ivregress, the instruments for lwage are educ age kidslt6 nwifeinc exper, and I included all of them in the lwage equation.

            Note further that the sem and ivregress results are identical. But note also that I changed the example a little by dropping expersq. As Allison notes, 2sls and SEM produce identical results when the models are just identified. If you put expersq back in the model will be overidentified and the results will somewhat differ.

            -------------------------------------------
            Richard Williams, Notre Dame Dept of Sociology
            StataNow Version: 19.5 MP (2 processor)

            EMAIL: [email protected]
            WWW: https://www3.nd.edu/~rwilliam

            Comment


            • #7
              @Richard Williams: the code supplied in #1 above for the -sem- command is correct. It allows for simultaneity between hours and lwage in the mean equation and not only for a non-zero covariance between the residual. And it does not converge! Your model, Richard, is recursive is structure: hours play no role in the equation for lwage.
              The reason, I think, for non-convergence is that the second equation is very weakly identified. This can be seen if one estimates each of the two equations separately with -ivreg2- which produces the weak instrument tests automatically.
              It would be interested to estimate the simultaneous equation system with some other software and see whether convergence occurs.

              Comment


              • #8
                Thank you Professor Richard and all. Now if i want to estimate the labour supply and demand equations simultaneously using SEM command, could i use the following? what should i add to account for the correlation between the two error terms of the two equations?

                Code:
                sem (hours<-lwage educ age kidslt6 nwifeinc) (lwage<-hours educ exper), nolog
                (325 observations with missing values excluded)
                
                Endogenous variables
                
                Observed:  hours lwage
                
                Exogenous variables
                
                Observed:  educ age kidslt6 nwifeinc exper
                
                Structural equation model                       Number of obs     =        428
                Estimation method  = ml
                Log likelihood     = -9507.5804
                
                ------------------------------------------------------------------------------
                             |                 OIM
                             |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
                -------------+----------------------------------------------------------------
                Structural   |
                  hours <-   |
                       lwage |   1585.111   507.6723     3.12   0.002     590.0912     2580.13
                        educ |  -177.8766   62.14895    -2.86   0.004    -299.6863   -56.06695
                         age |  -7.528549   9.173098    -0.82   0.412    -25.50749    10.45039
                     kidslt6 |  -202.4892   178.4448    -1.13   0.256    -552.2346    147.2562
                    nwifeinc |   -10.0286   6.446568    -1.56   0.120    -22.66364    2.606443
                       _cons |   2202.383   565.7198     3.89   0.000     1093.593    3311.174
                  -----------+----------------------------------------------------------------
                  lwage <-   |
                       hours |  -.0012456   .0003765    -3.31   0.001    -.0019835   -.0005077
                        educ |   .0839585   .0246807     3.40   0.001     .0355852    .1323319
                       exper |   .0514783   .0127025     4.05   0.000     .0265817    .0763748
                       _cons |   1.079102   .5469529     1.97   0.049     .0070939     2.15111
                -------------+----------------------------------------------------------------
                 var(e.hours)|    1728013   744175.7                        742974     4019022
                 var(e.lwage)|   1.225409   .4988145                      .5518124    2.721265
                ------------------------------------------------------------------------------
                Note: The LR test of model vs. saturated is not reported because the fitted
                      model is not full rank.

                Comment


                • #9
                  One more question:
                  I compare the results from SEM and ivregress 2sls.

                  1. For the labour supply equation, they give similar result: 1852 vs 1585 for the estimated coefficients of lwage.
                  Code:
                   ivregress 2sls hours (lwage= exper) educ age kidslt6 nwifeinc
                  
                  Instrumental variables (2SLS) regression          Number of obs   =        428
                                                                    Wald chi2(5)    =      14.99
                                                                    Prob > chi2     =     0.0104
                                                                    R-squared       =          .
                                                                    Root MSE        =     1465.4
                  
                  ------------------------------------------------------------------------------
                         hours |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
                  -------------+----------------------------------------------------------------
                         lwage |   1852.411    567.199     3.27   0.001     740.7212      2964.1
                          educ |  -206.7184   69.40184    -2.98   0.003    -342.7435   -70.69332
                           age |  -8.891157   10.22776    -0.87   0.385     -28.9372    11.15489
                       kidslt6 |  -181.2068   198.9487    -0.91   0.362    -571.1391    208.7255
                      nwifeinc |  -10.72081   7.187145    -1.49   0.136    -24.80735    3.365739
                         _cons |   2316.671   630.8575     3.67   0.000     1080.213    3553.129
                  ------------------------------------------------------------------------------
                  Instrumented:  lwage
                  Instruments:   educ age kidslt6 nwifeinc exper
                  2. For the demand equation or the wage offer equation, it is very different: -0.0012 and significant in SEM, but 0.0002 and not significant using ivregress 2sls.



                  Code:
                  . ivregress 2sls lwage (hours=age kidslt6 nwifeinc) educ exper
                  
                  Instrumental variables (2SLS) regression          Number of obs   =        428
                                                                    Wald chi2(3)    =      70.25
                                                                    Prob > chi2     =     0.0000
                                                                    R-squared       =     0.0872
                                                                    Root MSE        =     .69013
                  
                  ------------------------------------------------------------------------------
                         lwage |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
                  -------------+----------------------------------------------------------------
                         hours |   .0001988   .0002407     0.83   0.409     -.000273    .0006707
                          educ |   .1135644   .0154258     7.36   0.000     .0833304    .1437983
                         exper |   .0099578   .0080671     1.23   0.217    -.0058533    .0257689
                         _cons |  -.6363226   .3468548    -1.83   0.067    -1.316146    .0435004
                  ------------------------------------------------------------------------------
                  Instrumented:  hours
                  Instruments:   educ exper age kidslt6 nwifeinc
                  What causes the difference?

                  Comment


                  • #10
                    For the same data set, if i use 3SLS, the result is
                    Code:
                    . reg3 (hours lwage age educ nwifeinc kidslt6 ) (lwage hours educ exper)
                    
                    Three-stage least-squares regression
                    --------------------------------------------------------------------------
                    Equation             Obs   Parms        RMSE    "R-sq"       chi2        P
                    --------------------------------------------------------------------------
                    hours                428       5    1574.112   -3.1215      42.50   0.0000
                    lwage                428       3    .6901284    0.0872      70.25   0.0000
                    --------------------------------------------------------------------------
                    
                    ------------------------------------------------------------------------------
                                 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
                    -------------+----------------------------------------------------------------
                    hours        |
                           lwage |   2031.523   508.3715     4.00   0.000     1035.133    3027.913
                             age |  -10.20413   8.586057    -1.19   0.235    -27.03249    6.624234
                            educ |  -240.5073   60.31615    -3.99   0.000    -358.7247   -122.2898
                        nwifeinc |  -.0137361   3.562471    -0.00   0.997    -6.996051    6.968579
                         kidslt6 |  -181.8269   155.1897    -1.17   0.241    -485.9931    122.3393
                           _cons |   2383.655    551.391     4.32   0.000     1302.949    3464.362
                    -------------+----------------------------------------------------------------
                    lwage        |
                           hours |   .0001988   .0002407     0.83   0.409     -.000273    .0006707
                            educ |   .1135644   .0154258     7.36   0.000     .0833304    .1437983
                           exper |   .0099578   .0080671     1.23   0.217    -.0058533    .0257689
                           _cons |  -.6363226   .3468548    -1.83   0.067    -1.316146    .0435004
                    ------------------------------------------------------------------------------
                    Endogenous variables:  hours lwage 
                    Exogenous variables:   age educ nwifeinc kidslt6 exper

                    If i use the step-by-step procedure:1) OLS regress endogenous variables on all exogenous variables and obtain the predicted value for each endogenous variable; 2) substitute the predicted values for the endogenous variables in the supply and demand equations and use OLS, the results are
                    Code:
                    . reg lwage educ age kidslt6 nwifeinc exper
                    
                          Source |       SS           df       MS      Number of obs   =       428
                    -------------+----------------------------------   F(5, 422)       =     15.61
                           Model |  34.8632052         5  6.97264103   Prob > F        =    0.0000
                        Residual |  188.464236       422  .446597715   R-squared       =    0.1561
                    -------------+----------------------------------   Adj R-squared   =    0.1461
                           Total |  223.327441       427  .523015084   Root MSE        =    .66828
                    
                    ------------------------------------------------------------------------------
                           lwage |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                    -------------+----------------------------------------------------------------
                            educ |   .1026255   .0149869     6.85   0.000     .0731673    .1320837
                             age |  -.0044549   .0051109    -0.87   0.384    -.0145009    .0055911
                         kidslt6 |  -.0669334   .0884199    -0.76   0.449    -.2407317     .106865
                        nwifeinc |   .0058469   .0033172     1.76   0.079    -.0006733    .0123672
                           exper |   .0183417   .0047443     3.87   0.000     .0090163    .0276671
                           _cons |   -.262441   .2689983    -0.98   0.330    -.7911843    .2663023
                    ------------------------------------------------------------------------------
                    
                    . predict lwag_hat,xb
                    
                    . reg hours educ age kidslt6 nwifeinc exper
                    
                          Source |       SS           df       MS      Number of obs   =       753
                    -------------+----------------------------------   F(5, 747)       =     52.22
                           Model |   147860822         5  29572164.4   Prob > F        =    0.0000
                        Residual |   423048902       747  566330.524   R-squared       =    0.2590
                    -------------+----------------------------------   Adj R-squared   =    0.2540
                           Total |   570909724       752  759188.463   Root MSE        =    752.55
                    
                    ------------------------------------------------------------------------------
                           hours |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                    -------------+----------------------------------------------------------------
                            educ |   32.74054   12.89387     2.54   0.011     7.428011    58.05306
                             age |   -30.2981   4.024927    -7.53   0.000    -38.19961   -22.39658
                         kidslt6 |  -444.6052   58.42348    -7.61   0.000     -559.299   -329.9115
                        nwifeinc |  -3.534925   2.548568    -1.39   0.166    -8.538132    1.468282
                           exper |   46.75974   3.754744    12.45   0.000     39.38863    54.13085
                           _cons |   1306.864   236.3944     5.53   0.000     842.7879    1770.941
                    ------------------------------------------------------------------------------
                    
                    . predict hours_hat,xb
                    
                    . reg hours_hat lwage_hat educ age kidslt6 nwifeinc
                    
                          Source |       SS           df       MS      Number of obs   =       753
                    -------------+----------------------------------   F(5, 747)       =   1435.36
                           Model |   133921533         5  26784306.6   Prob > F        =    0.0000
                        Residual |  13939289.5       747  18660.3607   R-squared       =    0.9057
                    -------------+----------------------------------   Adj R-squared   =    0.9051
                           Total |   147860822       752  196623.434   Root MSE        =     136.6
                    
                    ------------------------------------------------------------------------------
                       hours_hat |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                    -------------+----------------------------------------------------------------
                       lwage_hat |   1942.918   30.87545    62.93   0.000     1882.305    2003.531
                            educ |  -163.5657    4.26701   -38.33   0.000    -171.9425    -155.189
                             age |  -18.81135    .695484   -27.05   0.000    -20.17668   -17.44601
                         kidslt6 |  -322.8417   10.89366   -29.64   0.000    -344.2275   -301.4558
                        nwifeinc |  -15.76448   .4539129   -34.73   0.000    -16.65558   -14.87339
                           _cons |   1817.023   44.88039    40.49   0.000     1728.917     1905.13
                    ------------------------------------------------------------------------------
                    
                    . reg lwage_hat hours_hat educ exper
                    
                          Source |       SS           df       MS      Number of obs   =       753
                    -------------+----------------------------------   F(3, 749)       =   2746.59
                           Model |  69.1584154         3  23.0528051   Prob > F        =    0.0000
                        Residual |  6.28654429       749   .00839325   R-squared       =    0.9167
                    -------------+----------------------------------   Adj R-squared   =    0.9163
                           Total |  75.4449597       752  .100325744   Root MSE        =    .09161
                    
                    ------------------------------------------------------------------------------
                       lwage_hat |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                    -------------+----------------------------------------------------------------
                       hours_hat |   .0000773   .0000129     6.01   0.000     .0000521    .0001026
                            educ |   .1099824   .0015195    72.38   0.000     .1069994    .1129654
                           exper |   .0146355   .0006935    21.11   0.000     .0132741    .0159968
                           _cons |  -.4691769   .0186262   -25.19   0.000    -.5057426   -.4326111
                    ------------------------------------------------------------------------------
                    It seems that for the same data set and same question of estimating the labour supply and demand equations, the "ivregress 2sls", the "sem", the "reg3(3sls)", and the step-by-step procedure give different results. Which one is better?

                    Comment


                    • #11
                      -sem- as you have implemented it does not allow for contemporaneous correlation between the residuals of the two equations. (When you did, it did not converge!)
                      -reg3- does allow for contemporaneous correlation between the residuals of the two equations.
                      If there is contemporaneous correlation between the residuals of the two equations the results could be very different.
                      For the model from Wooldridge's advanced textbook, I got the following result using -reg3- for the covariance matrix:
                      . matrix list e(Sigma)

                      symmetric e(Sigma)[2,2]
                      hours lwage
                      hours 1667250.6
                      lwage -799.60823 .46377055

                      implying a correlations of around 90% !
                      So I would favour the results from -reg3-.

                      Comment


                      • #12
                        Originally posted by Eric de Souza View Post
                        @Richard Williams: the code supplied in #1 above for the -sem- command is correct. It allows for simultaneity between hours and lwage in the mean equation and not only for a non-zero covariance between the residual. And it does not converge! Your model, Richard, is recursive is structure: hours play no role in the equation for lwage.
                        The reason, I think, for non-convergence is that the second equation is very weakly identified. This can be seen if one estimates each of the two equations separately with -ivreg2- which produces the weak instrument tests automatically.
                        It would be interested to estimate the simultaneous equation system with some other software and see whether convergence occurs.
                        The original post said it was trying to replicate the ivregress results from the original work. My code does that. The simultaneous causation model given in a later post is different from the ivregress model. I don’t have Wooldridge; did he actually estimate a reciprocal causation model?
                        -------------------------------------------
                        Richard Williams, Notre Dame Dept of Sociology
                        StataNow Version: 19.5 MP (2 processor)

                        EMAIL: [email protected]
                        WWW: https://www3.nd.edu/~rwilliam

                        Comment


                        • #13
                          Reply to Richard Williams. Wooldridge estimates each equation separately using 2SLS for each equation.

                          Comment


                          • #14
                            Yes, Wooldridge estimates each equation separately using 2SLS. I want to know whether i can use sem to estimate the labour supply and labour demand(wage offer) equations simultaneously. And also want to figure out what is the difference between using "sem", "reg3", "ivregress 2sls", and the "step-by-step OLS procedure" i mentioned above.
                            Most importantly, is my "step-by-step OLS procedure" correct? And it is equivalent to which Stata command?
                            Thank you!

                            (from the above discussion, the ivregress 2sls does not account for the correlation of the errors of the two equations, while the reg3 does, right?)
                            Last edited by Bob Wen; 28 Sep 2018, 07:14.

                            Comment


                            • #15
                              The sample size i use to do the "step-by-step OLS procedure" for simultaneous equations of labor supply and demand is wrong in above post. Here i use correct sample:
                              Code:
                              . reg hours educ age kidslt6 nwifeinc exper if lwage<.
                              
                                    Source |       SS           df       MS      Number of obs   =       428
                              -------------+----------------------------------   F(5, 422)       =     12.07
                                     Model |  32194479.7         5  6438895.94   Prob > F        =    0.0000
                                  Residual |   225116540       422  533451.517   R-squared       =    0.1251
                              -------------+----------------------------------   Adj R-squared   =    0.1148
                                     Total |   257311020       427   602601.92   Root MSE        =    730.38
                              
                              ------------------------------------------------------------------------------
                                     hours |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                              -------------+----------------------------------------------------------------
                                      educ |  -16.61385   16.37949    -1.01   0.311    -48.80939    15.58169
                                       age |  -17.14344   5.585832    -3.07   0.002    -28.12296   -6.163925
                                   kidslt6 |  -305.1949    96.6361    -3.16   0.002     -495.143   -115.2469
                                  nwifeinc |   .1101351   3.625429     0.03   0.976    -7.016013    7.236284
                                     exper |   33.97638   5.185154     6.55   0.000     23.78444    44.16833
                                     _cons |   1830.522   293.9942     6.23   0.000     1252.647    2408.397
                              ------------------------------------------------------------------------------
                              
                              . predict hours_hat,xb
                              
                              . reg lwage educ age kidslt6 nwifeinc exper if lwage<.
                              
                                    Source |       SS           df       MS      Number of obs   =       428
                              -------------+----------------------------------   F(5, 422)       =     15.61
                                     Model |  34.8632052         5  6.97264103   Prob > F        =    0.0000
                                  Residual |  188.464236       422  .446597715   R-squared       =    0.1561
                              -------------+----------------------------------   Adj R-squared   =    0.1461
                                     Total |  223.327441       427  .523015084   Root MSE        =    .66828
                              
                              ------------------------------------------------------------------------------
                                     lwage |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                              -------------+----------------------------------------------------------------
                                      educ |   .1026255   .0149869     6.85   0.000     .0731673    .1320837
                                       age |  -.0044549   .0051109    -0.87   0.384    -.0145009    .0055911
                                   kidslt6 |  -.0669334   .0884199    -0.76   0.449    -.2407317     .106865
                                  nwifeinc |   .0058469   .0033172     1.76   0.079    -.0006733    .0123672
                                     exper |   .0183417   .0047443     3.87   0.000     .0090163    .0276671
                                     _cons |   -.262441   .2689983    -0.98   0.330    -.7911843    .2663023
                              ------------------------------------------------------------------------------
                              
                              . predict lwage_hat,xb
                              Code:
                              . reg hours_hat lwage_hat educ age kidslt6 nwifeinc if lwage<.
                              
                                    Source |       SS           df       MS      Number of obs   =       428
                              -------------+----------------------------------   F(5, 422)       >  99999.00
                                     Model |    32194480         5  6438895.99   Prob > F        =    0.0000
                                  Residual |  2.0195e-06       422  4.7856e-09   R-squared       =    1.0000
                              -------------+----------------------------------   Adj R-squared   =    1.0000
                                     Total |    32194480       427  75396.9086   Root MSE        =    6.9e-05
                              
                              ------------------------------------------------------------------------------
                                 hours_hat |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                              -------------+----------------------------------------------------------------
                                 lwage_hat |   1852.411   .0000268  6.9e+07   0.000     1852.411    1852.411
                                      educ |  -206.7184   3.28e-06 -6.3e+07   0.000    -206.7184   -206.7184
                                       age |  -8.891158   4.83e-07 -1.8e+07   0.000    -8.891159   -8.891157
                                   kidslt6 |  -181.2068   9.39e-06 -1.9e+07   0.000    -181.2068   -181.2068
                                  nwifeinc |  -10.72081   3.39e-07 -3.2e+07   0.000    -10.72081    -10.7208
                                     _cons |   2316.671   .0000298  7.8e+07   0.000     2316.671    2316.671
                              ------------------------------------------------------------------------------
                              
                              . reg lwage_hat hours_hat educ exper if lwage<.
                              
                                    Source |       SS           df       MS      Number of obs   =       428
                              -------------+----------------------------------   F(3, 424)       =   3363.64
                                     Model |  33.4573948         3  11.1524649   Prob > F        =    0.0000
                                  Residual |  1.40581063       424  .003315591   R-squared       =    0.9597
                              -------------+----------------------------------   Adj R-squared   =    0.9594
                                     Total |  34.8632054       427  .081646851   Root MSE        =    .05758
                              
                              ------------------------------------------------------------------------------
                                 lwage_hat |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                              -------------+----------------------------------------------------------------
                                 hours_hat |   .0001988   .0000201     9.90   0.000     .0001594    .0002383
                                      educ |   .1135644   .0012871    88.24   0.000     .1110346    .1160942
                                     exper |   .0099578   .0006731    14.79   0.000     .0086348    .0112808
                                     _cons |  -.6363226     .02894   -21.99   0.000    -.6932063   -.5794389
                              ------------------------------------------------------------------------------
                              It seems that this procedure is identical to using "ivregress 2sls" for each equation.
                              Last edited by Bob Wen; 28 Sep 2018, 07:43.

                              Comment

                              Working...
                              X