Announcement

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

  • Storing estimates after running a regression on a multiply imputed dataset

    Hi,

    I'm running a regression on a multiply imputed dataset. I'm using the code below:

    mi estimate, cmdok: xtreg Y X1 - Xn i.year , fe
    est sto FE

    mi estimate, cmdok: xtivreg2 Y X2 - Xn (X1=Instrument) Year 2 - Year 15, fe
    est sto IV

    hausman IV FE

    I am unable to run the Hausman test as I have not managed to successfully store estimates from the FE regression. I read somewhere that using the miest command I can save the estimates but I haven't manged to figure out how I can run the command. Your help will be appreciated. Thank you so much!



  • #2
    Use the post option to post estimated coefficients and VCE to e(b) and e(V)

    Code:
    mi estimate, cmdok post: xtreg Y X1 - Xn i.year , fe
    est sto FE
    
    mi estimate, cmdok post: xtivreg2 Y X2 - Xn (X1=Instrument) Year 2 - Year 15, fe 
    est sto IV
    
    hausman IV FE

    Comment


    • #3
      As an aside: shouldn't -FE- come before -IV- in -hausman- code?
      Kind regards,
      Carlo
      (Stata 19.0)

      Comment

      Working...
      X