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.
Related Posts with Harrell's C stat after multiple imputation
missing option in proportion commandHello everyone, I am having a problem switching to STATA 14 to 16 Command proportion does not have…
how to count numbers of households expose to a specific shock?Dear all, I need your help in the following issue in coding my data. I have a data set for a year …
First Difference of a Variable with RangestatHi, Is it possible to take the first difference (x - x[_n-1]) of a variable using Rangestat or with …
Testing for significant differences between the betas of two FE model specifications without using an interaction termGood morning all, I am using 2-wave panel data and a standard fixed effects model to estimate the m…
FMM predictive accuracy measuresDear STATA list members, I'm using the STATA command fmm to fit a 2-component normal mixture model …
Subscribe to:
Post Comments (Atom)
0 Response to Harrell's C stat after multiple imputation
Post a Comment