Announcement

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

  • Calculating adjusted risk ratio in MICE model using poisson regression

    Hi Guys,

    I am modelling a binary outcome variable prevalence <2% using mice for missing data. I am trying to get adjusted risk ratios using a poisson model and multiple imputation chained equations.

    I have the following code:

    mi set mlong
    mi register imputed V1 V2 V3 V4 V5 V6
    mi impute chained (mlogit) V2 (mlogit)V3 (logit) V4 (mlogit) V5 (logit) V6 = V1, add (10) rseed (53421) savetrace(trace1, replace)
    mi estimate: glm V1V2 V3 V4 V5 V6, fam(poisson) link(log) nolog vce(robust) eform

    I am able to obtain beta coefficients with this code but for some reason I am not able to obtain RR? Any clue how I can obtain this in an imputed mice model?

    Thanks for your help!

  • #2
    Put the -eform- option in the -mi estimate- prefix to get what you want:

    Code:
    mi estimate, eform: glm V1 V2 V3 V4 V5 V6, fam(Poisson) link(log) nolog vce(robust)
    Or, more simply:
    Code:
    mi estimate, irr: Poisson V1 V2 V3 V4 V5 V6, vce(robust)
    The way you wrote it, Stata actually calculates the risk ratios on each of the imputed data sets, but then applies Rubin's rules and reports the results as coefficients. When you put the -eform- (or -irr-) option in the -mi estimate:- prefix, Stata will convert the Rubin's rules output to exponentiated form (i.e. risk ratio).

    Comment


    • #3
      Welcome back, Clyde Schechter

      Comment


      • #4
        Same problems here, any new ideas? Even with irr: or eform it won't report the IRR.
        if i use irr, it would shows:
        Code:
        .   mi estimate, irr: Poisson glm FU1_BMI_grp i.arm sex baseline_age weight_squared height b > aseline_SBP6, vce(robust) program poisson already defined program poisson already defined (error occurred while loading Poisson.ado) r(110);  end of do-file
        if i use eform, it would shows:
        Code:
         mi estimate, eform: glm FU1_BMI_grp i.arm i.sex baseline_age weight_squared height basel > ine_SBP, fam(Poisson) link(log) nolog vce(robust) eform  Multiple-imputation estimates                   Imputations       =         25 Generalized linear models                       Number of obs     =      1,000                                                 Average RVI       =     0.0293                                                 Largest FMI       =     0.1071 DF adjustment:   Large sample                   DF:     min       =   2,124.13                                                         avg       = 890,739.16                                                         max       = 2250308.43 Model F test:       Equal FMI                   F(   6,135876.0)  =      19.56 Within VCE type:       Robust                   Prob > F          =     0.0000  --------------------------------------------------------------------------------    FU1_BMI_grp |     exp(b)   Std. err.      t    P>|t|     [95% conf. interval] ---------------+----------------------------------------------------------------            arm |  Intervention  |   1.000357   .0733156     0.00   0.996     .8665043    1.154886          1.sex |   1.063801   .0769284     0.86   0.392     .9232216    1.225786   baseline_age |   .9076481   .1255205    -0.70   0.484     .6921543    1.190233 weight_squared |   1.000935   .0001879     4.98   0.000     1.000567    1.001303         height |   1.010199   .0106397     0.96   0.335     .9895585     1.03127   baseline_SBP |   1.015305    .003936     3.92   0.000     1.007615    1.023053          _cons |   .0271511   .0303053    -3.23   0.001     .0030456    .2420509
        Anyone has suggestions on this to get RR for imputated data?

        Comment


        • #5
          In your first command in #7, it is an error to begin the command with -Poisson glm-. e them IRR. I'm afraid that's theThere is a -glm- command, which can do Poisson regression when you specify -family(poisson)-, as you did in your second command. There is also a -poisson- command (N.B. lower case!). There is no command named Poisson. I don't know why the error message that Stata gives you is "program poisson already defined." It should give you a message saying there is no command Poisson.

          In your second command, you are getting a heading exp(b) where you would like to see IRR. With -exp(b)- Stata is acknowledging that the entries in that column of the output table are exponentiated coefficients. But if you do
          Code:
          mi estimate, irr: poisson glm FU1_BMI_grp i.arm sex baseline_age weight_squared height baseline_SBP6, vce(robust)
          you will get what you want: -poisson- will run, and the column header will be IRR.

          Comment


          • #6
            To be more specific,


            when using-irr-,
            it shows the error: program poisson already defined

            when using -eform-,
            it only shows the beta coeffiecient.


            Comment


            • #7
              Dear Clyde, thank you for you response, i think i could get the result now.

              You are right for the second code.

              Best regards.

              Comment

              Working...
              X