Announcement

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

  • Exporting results when using multiple imputation

    Hello,

    (Firstly, really sorry for lack of direct export of STATA code - I'm using it via a secure VDI so have had to re-write here)


    Could somebody kindly help me with running commands to a) assess the linear trend and b) export results to excel, when using multiple imputation with logistic regression?

    This was all working for me without multiple imputation. My code was:

    logistic angiogram i.ckdstage i.ageyears_grp obese cvd diabetes...

    contrast p.ckdstage, noeffects

    est store OR

    outreg2[OR] using "Results_angio", excel replace stats(coef ci eform noaster sideway ctitle(Model1) keep (1.ckdstage 2.ckdstage 3.ckdstage 4.ckdstage) dec(2)


    ************************************************** ************************************************** *****************************
    However, I then realised I needed to impute some ethnicity data and using multiple imputation for this.

    I then attempted the following, but receive an error message for my attempt to determine a linear trend and to export to excel:

    mi estimate, or: logit angiogram i.ckdstage i.ageyears_grp obese cvd diabetes...

    contrast p.ckdstage, noeffects

    est store OR

    outreg2[OR] using "Results_angio", excel replace stats(coef ci eform noaster sideway ctitle(Model1) keep (1.ckdstage 2.ckdstage 3.ckdstage 4.ckdstage) dec(2)



    Sorry if this is terribly obvious. It's sadly not to me!

    Thankyou so much for your time.

    Jemima






  • #2
    You need the -post- option to send results to e(b) and e(V).

    Code:
    mi estimate, or post: logit angiogram i.ckdstage i.ageyears_grp obese cvd diabetes...

    However, any contrasts that you perform relate to the last estimated model from mi estimate. There is a command mimrgns from SSC which you can install and read the documentation on some issues present if using a single dataset to do post-estimation analysis after multiple imputation.

    Comment


    • #3
      Dear Andrew,

      Thank you so much. I'll start reading the documentation re "post" and "mimrgns". So much easier once I know what to read about.

      BW

      jemima

      Comment

      Working...
      X