Announcement

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

  • ivreg2 estimated, but results not displayed

    Hi,

    I am trying to implement gmm using ivreg2 command. I first label the endogenous and exogenous variables, as well as instrument. Afterwards, I run the ivreg2 regression, by groups (industry_2d). The commands are below:

    * Defining vectors of exogenous, endogenous, and instrumental variables.
    global exoreg /*
    */ lnk ln_K_l1 ln_M_l1 /*
    */ km_l1 k2_l1 m2_l1 k2m_l1 km2_l1 k3_l1 m3_l1
    global endoreg lnm lnl
    global instr ln_L_b_l1 ln_M_l2

    sort industry_2d

    statsby _b _se size=e(N), by(industry_2d) saving(tmp_WLP_GO_M_1, replace): /*
    */ ivreg2 lnrev $exoreg ($endoreg = $instr), gmm cluster(id)
    However, I obtain the following results(no results, but the commands seem to be applied well):

    Code:
    .         statsby _b _se   size=e(N), by(industry_2d) saving(tmp_WLP_GO_M_1, replace): /* 
    >          */ ivreg2 lnrev $exoreg ($endoreg = $instr), gmm cluster(id)
    (running ivreg2 on estimation sample)
    
          command:  ivreg2 lnrev lnk ln_K_l1 ln_M_l1 km_l1 k2_l1 m2_l1 k2m_l1 km2_l1 k3_l1
                        m3_l1 (lnm lnl = ln_L_b_l1 ln_M_l2), gmm cluster(id)
        _eq2_size:  e(N)
               by:  industry_2d
    
    Statsby groups
    ----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
    ..................................................    50
    Does anyone know what I am doing wrong?
    Many thanks in advance.

  • #2
    Did you have a look at the file "tmp_WLP_GO_M_1.dta"?
    Ho-Chuan (River) Huang
    Stata 17.0, MP(4)

    Comment


    • #3
      I did. And contains the following variables, per industry:
      indus~2d | _b_lnm | _b_lnl | _b_lnk | _b_ln_K~1 | _b_ln_M~1 | _b_km_l1 | _b_k2_l1 | _b_m2_l1 | _b_k2m_l1 | _b_km2_l1 | _b_k3_l1 | _b_m3_l1 | _b_cons |
      _se_lnm | _se_lnl | _se_lnk | _se~K_l1 | _se~M_l1 | _s~km_l1 | _s~k2_l1 | _se_m2~1 | _s~2m_l1 | _se_km2~ | _se_k3~1 | _se_m3~1 | _se_cons | _eq2_s~e |

      Comment


      • #4
        Roughly, it works in the following example.
        Code:
        use http://fmwww.bc.edu/ec-p/data/hayashi/griliches76.dta, clear
        
        statsby _b _se size=e(N), by(smsa) saving(smsa.dta, replace): ///
        ivreg2 lw s expr tenure rns smsa i.year (iq=med kww age mrt), gmm2s robust
        
        use smsa.dta, clear
        Thus, my first suggestion is to use "gmm2s" instead of "gmm". If it still does not work, please remove the options "gmm cluster(id)", and re-run to see if it generates the desired results.
        Ho-Chuan (River) Huang
        Stata 17.0, MP(4)

        Comment


        • #5
          River Huang, thanks!

          Comment

          Working...
          X