Announcement

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

  • how to get Harrell's C after multiple imputation

    Hi all,
    When I used 'estat concordance' after 'stcox', I can easily get C index for the cox model. However, I need to use MI for the missing data. So how to get a C index after multiple imputation?
    My codes are:
    mi set w
    mi register imputed bmi
    mi imputed regress bmi age bp wc
    mi estimate: stcox bmi, nolog

    Then I don't know how to get C index. I tried 'mi estimate: estat concordance', but it is not allowed.
    Thanks so much in advance for you any help!!
    Mileo


  • #2
    you may find the strategy I showed (for mi with logistic regression) helpful: http://www.statalist.org/forums/foru...ng-mi-estimate

    Comment


    • #3
      Be aware however, that combining point estimates using Rubin Rules assumes asymptotic normality, which might or might not not be given for the requested statistic here.

      See also: http://www.stata.com/support/faqs/st...-imputed-data/

      Best
      Daniel

      Comment


      • #4
        Originally posted by Rich Goldstein View Post
        you may find the strategy I showed (for mi with logistic regression) helpful: http://www.statalist.org/forums/foru...ng-mi-estimate
        Thanks so much, Rich!
        I used 'mi estimate: stcox fgroup, nolog' and then I displayed 'ereturn list' as shown below:

        scalars:
        e(df_m) = .
        e(ll) = .
        e(risk) = 3791471
        e(converged) = 1
        e(N) = 3742
        e(N_fail) = 148
        e(N_sub) = 3742
        e(ll_0) = .
        e(r2_p) = .
        e(rank) = .
        e(chi2) = .
        e(_dfnote_mi) = 0
        e(mcerror_mi) = 0
        e(N_min_mi) = 3742
        e(N_max_mi) = 3742
        e(cilevel_mi) = 95
        e(k_exp_mi) = 0
        e(reparm_rc_mi) = .
        e(k_eq_model_mi) = 1
        e(esampvary_mi) = 0
        e(N_sub_mi) = 3742
        e(M_mi) = 10
        e(N_mi) = 3742
        e(df_c_mi) = .
        e(df_r_mi) = 698.5392531560335
        e(df_m_mi) = 1
        e(F_mi) = 15.53734256451963
        e(rvi_avg_F_mi) = .1280415569034288
        e(ufmi_mi) = 0
        e(p_mi) = .000089033389238
        e(rvi_avg_mi) = .1280415569034288
        e(fmi_max_mi) = .1160351142016343
        e(df_max_mi) = 698.5392531560335
        e(df_avg_mi) = 698.5392531560335
        e(df_min_mi) = 698.5392531560335

        macros:
        e(_sortseedcmd_mi) : "1001"
        e(_sortseed_mi) : "1001"
        e(cmdline_mi) : "mi estimate : stcox fgroup, nolog"
        e(_estat_cmd_mi) : "stcox_estat"
        e(_predict_mi) : "stcox_p"
        e(mi) : "mi"
        e(cmd) : "mi estimate"
        e(ecmd2_mi) : "stcox"
        e(ecmd_mi) : "cox"
        e(cmd_mi) : "stcox"
        e(prefix_mi) : "mi estimate"
        e(title_mi) : "Multiple-imputation estimates"
        e(wvce_mi) : "oim"
        e(modeltest_mi) : "Equal FMI"
        e(dfadjust_mi) : "Large sample"
        e(rc_mi) : "0 0 0 0 0 0 0 0 0 0"
        e(m_est_mi) : "1 2 3 4 5 6 7 8 9 10"
        e(m_mi) : "1 2 3 4 5 6 7 8 9 10"
        e(names_vvs_mi) : "ll r2_p chi2"
        e(names_vvl_mi) : "datasignature"
        e(footnote) : "stcox_footnote"
        e(cmdline) : "stcox fgroup, nolog"
        e(method) : "breslow"
        e(k_eform) : "1"
        e(t0) : "_t0"
        e(crittype) : "log likelihood"
        e(depvar) : "_t"
        e(chi2type) : "LR"
        e(marginsnotok) : "CSNell DEViance DFBeta ESR LDisplace LMax MGale SCAledsch SCHoenfeld SCores"
        e(marginsprop) : "addcons"
        e(datasignaturevars) : "_t _t0 _d fgroup"
        e(vce) : "oim"
        e(ties) : "breslow"

        So now I need to use a similar code to 'estat concordance' to run the 10 imputed data and average the c-index. But it was stored as a macro (highlighted in bold above) instead of in the scalars. How can I run it and get an averaged c-index? And if possible, how to get the 95% confidence interval of the average c-index?
        I am a new STATA users, so I may have to ask such stupid questions...

        Thanks so much!
        Mileo



        Comment


        • #5
          I think that the following line from my prior example (link above) should help:

          Code:
           
           qui mi xeq 1/`M': logistic hodc `rhs'; scalar r2=r2+e(r2_p); lroc, nog; scalar cstat=cstat+r(area)
          if that doesn't help, someone else might be able to help; see esp. the "lroc, nog" followed by the scalar (I have not actually estimated a survival model in years)

          Comment


          • #6
            Dear all,

            I am having quite a few problems figuring out how to calculate Harell's C-stat following stcox on imputed data. I have tried to look at your examples above as well as the links you provided. Somehow my results don't come out right.

            I have tried the following code:

            local model "score1plus"
            mi estimate, hr saving(miest, replace): stcox `model'
            local M=r(M)
            scalar r2=0
            scalar harrell_c=0
            qui mi xeq 1/`M': stcox `model'; estat concordance; scalar harrell_c = r(C); scalar harrell=(r(n_E)+(r(n_T)/2))/r(n_P)
            scalar r2=r2/`M'
            scalar harrell_c=r(C)/`M'
            scalar harrell=((r(n_E)+(r(n_T)/2))/r(n_P))/`M'
            noi di "Pseudo R=squared over imputed data = " r2
            noi di "C statistic over imputed data = " harrell_c
            noi di "C statistic = " harrell
            ereturn list

            In the code above I get the same results from calculating "C-statistics over imputed data" and "C statistic". However, I am not sure that my results add up. When I calculate C-statistics on non-imputed data I get a C-stat of 0.92. With these calculations I get a C-stat of 0.0921. Not sure why?!

            I would be very grateful for any input.

            Comment

            Working...
            X