Announcement

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

  • Storing the results of suest on MI data

    Dear Statalist users,
    I am doing an analysis where I want to compare whether some associations differ between people who eat much Fish and People who eat less Fish. I have multiple imputed datasets, and use the suest command. The code looks as follows:
    Code:
    cap program drop mysuest
    program mysuest, eclass properties(mi)
            version 15.0
     args model1 model2 
    
            qui `model1'
            estimates store est1
            qui `model2'
            estimates store est2
            suest est1 est2
            estimates drop est1 est2
           
            ereturn local title "Seemingly unrelated estimation"
    end
    
    
    eststo: mi estimate (diffAs: [est1_mean]logAs - [est2_mean]logAs) (diffHg: [est1_mean]logHg - [est2_mean]logHg), post nocoef: ///
    mysuest "regress PCT_5mC logAs logHg i.sex i.smoking if TOTAL_Fish_Intake<23.72" "regress PCT_5mC logAs logHg i.sex i.smoking if TOTAL_Fish_Intake>=23.72&TOTAL_Fish_Intake!=."
    
     est store PCT_5mC_suest_fish
    I then use -esttab- to make a table of the results in Word:

    Code:
    esttab PCT_5mC_suest_fish using PCT_5mC_suest.rtf, ci compress nostar nogaps nonumber noconstant nobaselevels brackets replace
    ¨The table, however, only shows the estimation results of the two linear regressions, not the output from the suest comparison (shown below), which is the one I want to have in the table. How can I achieve this?
    Code:
    Multiple-imputation estimates                   Imputations       =        100
    Seemingly unrelated estimation                  Number of obs     =        630
                                                    Average RVI       =     0.0108
                                                    Largest FMI       =     0.0138
    DF adjustment:   Large sample                   DF:     min       = 523,849.92
                                                            avg       =   1.01e+07
    Within VCE type:       Robust                           max       =   1.97e+07
    
           diffAs: [est1_mean]logAs - [est2_mean]logAs
           diffHg: [est1_mean]logHg - [est2_mean]logHg
    
    ------------------------------------------------------------------------------
                 |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
          diffAs |   .0027628   .0092464     0.30   0.765    -.0153597    .0208854
          diffHg |   -.010537   .0154482    -0.68   0.495    -.0408149     .019741
    ------------------------------------------------------------------------------
    Best regards,
    Kjell

  • #2
    I have not thought about your general approach here, so I cannot comment on that. Also, this is a bit of a guess since I have not tried, but I believe that esttab (you should have told us where it is from) picks results from e(b) and e(V); the results of your diff* are stored in e(b_Q_mi) and e(V_Q_mi), respectively.

    Best
    Daniel

    Comment

    Working...
    X