Announcement

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

  • Standardized mortality ratios following multiple imputation

    I'm honestly a bit unsure of the proper etiquite for estimating SMRs in an (multiple imputation) MI data set.
    Merging with the standardized population with the MI seems to work.
    However implementing the command
    Code:
    strate
    following the merge is the issue.

    Before I performed the multiple imputation, I used the following code to estimate SMRs:
    Code:
    strate, smr(mortrate)
    With "mortrate" being the rate of mortality in the General Population.

    Following MI, I haven't been able to obtain the SMRs.

    Code:
    mi estimate, cmdok: strate smr(mortrate)
    Using the code above, I received error message 101 : factor variables and time-series operators not allowed an error occurred when mi estimate executed strate on m=1

    Any inklings would be greatly appreciated.


  • #2
    It's not clear from your post which variable you imputed.
    At any rate, you can obtain SMRs using poisson regression via the -poisson- command, which supports -mi estimate-

    Comment


    • #3
      Thank you - of course I should have realized poisson was the next step in working out These SMRs. Thank you for the Suggestion. I have to further ask how it would be possible to test the goodness of fit for a multipley imputed model after performing a poisson Regression. (I've searched the helpfiles and didn't find this answer)

      Code:
      mi estimate, dots post: poisson _d male, exposure(mortrate)
      Code:
      mi lincom _cons, irr
      allows me to derive SMRs for this Population.

      however the usual
      Code:
      estat gof
      doesn't allow me to test for gof.

      when I run just the Basic data set without MI
      Code:
      keep if _mi_m==0
      Code:
      poisson _d, exposure(mortrate)
      Code:
      estat gof
      I find that the poisson model does not fit. Is there anyway to check with the MI dataset?

      Thanks again.

      Comment


      • #4
        Anne:
        if -poisson- does not fit your data (in all likelihood due to overdispersion), you can switch to -nbreg- (that is, a general case of -poisson- that accomodates overdispersion via -alpha- parameter).
        -nbreg- allows the -irr- option and is supported by -mi estimate-.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Thanks Carlo! I have gone ahead and performed a nbreg

          I just wanted to cover all my bases to 100% rule out the Poisson model from the imputed data.

          On another note, do you know if there is a way to test the goodness of fit from a negative binomial Regression model?

          Comment


          • #6
            Anne:
            yes, you can test the goodness of fit of -nbreg- via -linktest-:
            Code:
            . use http://www.stata-press.com/data/r15/rod93.dta
            
            . nbreg deaths i.cohort, irr
            
            Fitting Poisson model:
            
            Iteration 0:   log likelihood =  -325.7993 
            Iteration 1:   log likelihood =  -325.7993 
            
            Fitting constant-only model:
            
            Iteration 0:   log likelihood = -114.33669 
            Iteration 1:   log likelihood = -110.33038 
            Iteration 2:   log likelihood = -108.56521 
            Iteration 3:   log likelihood = -108.56018 
            Iteration 4:   log likelihood = -108.56018 
            
            Fitting full model:
            
            Iteration 0:   log likelihood = -108.48867 
            Iteration 1:   log likelihood = -108.48841 
            Iteration 2:   log likelihood = -108.48841 
            
            Negative binomial regression                    Number of obs     =         21
                                                            LR chi2(2)        =       0.14
            Dispersion     = mean                           Prob > chi2       =     0.9307
            Log likelihood = -108.48841                     Pseudo R2         =     0.0007
            
            ------------------------------------------------------------------------------
                  deaths |        IRR   Std. Err.      z    P>|z|     [95% Conf. Interval]
            -------------+----------------------------------------------------------------
                  cohort |
              1960-1967  |   1.060914   .3159846     0.20   0.843     .5917749     1.90197
              1968-1976  |   .9475465   .2825224    -0.18   0.857     .5282075    1.699795
                         |
                   _cons |   84.42857    17.7909    21.05   0.000     55.86285    127.6015
            -------------+----------------------------------------------------------------
                /lnalpha |  -1.207379   .3108622                     -1.816657   -.5980999
            -------------+----------------------------------------------------------------
                   alpha |     .29898   .0929416                      .1625683    .5498555
            ------------------------------------------------------------------------------
            Note: Estimates are transformed only in the first equation.
            Note: _cons estimates baseline incidence rate.
            LR test of alpha=0: chibar2(01) = 434.62               Prob >= chibar2 = 0.000
            
            . linktest
            
            Fitting Poisson model:
            
            Iteration 0:   log likelihood =  -325.7993 
            Iteration 1:   log likelihood =  -325.7993 
            
            Fitting constant-only model:
            
            Iteration 0:   log likelihood = -114.33669 
            Iteration 1:   log likelihood = -110.33038 
            Iteration 2:   log likelihood = -108.56521 
            Iteration 3:   log likelihood = -108.56018 
            Iteration 4:   log likelihood = -108.56018 
            
            Fitting full model:
            
            Iteration 0:   log likelihood = -108.48867 
            Iteration 1:   log likelihood = -108.48841 
            Iteration 2:   log likelihood = -108.48841 
            
            Negative binomial regression                    Number of obs     =         21
                                                            LR chi2(2)        =       0.14
            Dispersion     = mean                           Prob > chi2       =     0.9307
            Log likelihood = -108.48841                     Pseudo R2         =     0.0007
            
            ------------------------------------------------------------------------------
                  deaths |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
            -------------+----------------------------------------------------------------
                    _hat |   1.000152   719.3405     0.00   0.999    -1408.881    1410.882
                  _hatsq |  -.0000173    81.0247    -0.00   1.000    -158.8055    158.8055
                   _cons |  -.0003335   1596.432    -0.00   1.000     -3128.95    3128.949
            -------------+----------------------------------------------------------------
                /lnalpha |  -1.207379   .3108622                     -1.816657   -.5980999
            -------------+----------------------------------------------------------------
                   alpha |     .29898   .0929416                      .1625683    .5498555
            ------------------------------------------------------------------------------
            LR test of alpha=0: chibar2(01) = 434.62               Prob >= chibar2 = 0.000
            
            .
            Since -hat_sq- (ie, squared prediction) fails to reach statistical significance, -nbreg. is correctly specified.
            Kind regards,
            Carlo
            (Stata 19.0)

            Comment


            • #7
              Thank you so much for this insight! It's quite helpful.

              Comment

              Working...
              X