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
Advice on observational study data analysisHello everyone, I am doing a fairly large population study to estimate the treatment effect of a dr…
How to use marker symbols with twoway graphDear Statalists, I have two questions that I am sure are relatively easy for you. First: I am plott…
How to make a new variable from a group of variables answered on a rickert scaleHi All, I am using a firm-level data set and I have 11 questions relating to the obstacles to innov…
Using -xtile- to assess the impact of a variable on an outcomeHi All, I am looking to understand at what number of kids or distribution does a household member g…
Twoway graphing: How to smooth several curves while using rareaDear Statalisters, I am currently working on a twoway graph using point estimates created by using …
Subscribe to:
Post Comments (Atom)
0 Response to Harrell's C stat after multiple imputation
Post a Comment