Announcement

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

  • Harrell's C stat after multiple imputation

    Dear all,

    I am having problems figuring out how to calculate Harell's C-stat following stcox on imputed data.

    I am using Stata version 14.2. I have tried to look at previous examples and posts on the same topic back to Oct 2014 (also tried to post my question here but didn't get an answer -therefore I am trying a new post).

    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" and with these calculations I get a C-stat of 0.0921. However, when I calculate C-statistics on non-imputed data I get a C-stat of 0.92. Not sure why?

    Have any of you been succesful in calculating Harell's C-stat following multiple imputation using st cox? If so - which code have you used?

    I would be very grateful for any input.

  • #2
    Unfortunately, I don't know whether you may get this with Stata 14, but it seems this array of estimations (mi + stcox + Harrell's C) is available in Stata 15, as shown here.
    Best regards,

    Marcos

    Comment

    Working...
    X