Hi!
I am trying to develop a new clinical score to predict sudden cardiac death in patients with heart failure. The score has been developed after performing competing risk regression models considering non-sudden cardiac death as a competing event. To estimate the predictive ability of the score I have used the “somersd” command in order to obtain the Harrel´s c statistic as seen below:
************************************************** ************************************************** ******
************************************************** ************************************************** *******
. stcrreg Score2 , compete( Mort_sobtada_5_anys==2)
failure _d: Mort_sobtada_5_anys == 1
analysis time _t: KM_exitus_5_anys
Iteration 0: log pseudolikelihood = -271.74795
Iteration 1: log pseudolikelihood = -271.61285
Iteration 2: log pseudolikelihood = -271.61278
Iteration 3: log pseudolikelihood = -271.61278
Competing-risks regression No. of obs = 837
No. of subjects = 837
Failure event : Mort_sob~s == 1 No. failed = 43
Competing event: Mort_sob~s == 2 No. competing = 293
No. censored = 501
Wald chi2(1) = 29.22
Log pseudolikelihood = -271.61278 Prob > chi2 = 0.0000
------------------------------------------------------------------------------
| Robust
_t | SHR Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
Score2 | 1.105001 .0204097 5.41 0.000 1.065714 1.145736
------------------------------------------------------------------------------
.
. predict shr
(option shr assumed; relative subhazard)
.
. gen invshr = 1/shr
.
. gen censind = 1-_d if _st==1
.
. somersd _t invshr if _st == 1, cenind(censind) tdist transf(c)
Somers' D with variable: _t
Transformation: Harrell's c
Valid observations: 837
Degrees of freedom: 836
Symmetric 95% CI for Harrell's c
------------------------------------------------------------------------------
| Jackknife
_t | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
invshr | .7613652 .0349213 21.80 0.000 .6928214 .829909
------------------------------------------------------------------------------
************************************************** ************************************************
************************************************** ************************************************
Now, I want to perform an internal validation, assessing internally how the results can be generalizater to an indeoendent dataset using bootstrapping with 1000 replications:
. bootstrap, reps(1000) seed(1985): somersd _t invshr if _st == 1, cenind(censind) tdist transf(c)
(running somersd on estimation sample)
Bootstrap replications (1000)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5
.................................................. 50
.................................................. 100
.................................................. 150
.................................................. 200
.................................................. 250
.................................................. 300
.................................................. 350
.................................................. 400
.................................................. 450
.................................................. 500
.................................................. 550
.................................................. 600
.................................................. 650
.................................................. 700
.................................................. 750
.................................................. 800
.................................................. 850
.................................................. 900
.................................................. 950
.................................................. 1000
Somers' D with variable: _t
Transformation: Harrell's c
Valid observations: 837
Degrees of freedom: .
Symmetric 95% CI for Harrell's c
------------------------------------------------------------------------------
| Observed Bootstrap Normal-based
_t | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
invshr | .7613652 .037203 20.47 0.000 .6884486 .8342818
------------------------------------------------------------------------------
************************************************** ************************************************** *************
************************************************** ************************************************** *************
I have two questions regarding this topic:
I am trying to develop a new clinical score to predict sudden cardiac death in patients with heart failure. The score has been developed after performing competing risk regression models considering non-sudden cardiac death as a competing event. To estimate the predictive ability of the score I have used the “somersd” command in order to obtain the Harrel´s c statistic as seen below:
************************************************** ************************************************** ******
************************************************** ************************************************** *******
. stcrreg Score2 , compete( Mort_sobtada_5_anys==2)
failure _d: Mort_sobtada_5_anys == 1
analysis time _t: KM_exitus_5_anys
Iteration 0: log pseudolikelihood = -271.74795
Iteration 1: log pseudolikelihood = -271.61285
Iteration 2: log pseudolikelihood = -271.61278
Iteration 3: log pseudolikelihood = -271.61278
Competing-risks regression No. of obs = 837
No. of subjects = 837
Failure event : Mort_sob~s == 1 No. failed = 43
Competing event: Mort_sob~s == 2 No. competing = 293
No. censored = 501
Wald chi2(1) = 29.22
Log pseudolikelihood = -271.61278 Prob > chi2 = 0.0000
------------------------------------------------------------------------------
| Robust
_t | SHR Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
Score2 | 1.105001 .0204097 5.41 0.000 1.065714 1.145736
------------------------------------------------------------------------------
.
. predict shr
(option shr assumed; relative subhazard)
.
. gen invshr = 1/shr
.
. gen censind = 1-_d if _st==1
.
. somersd _t invshr if _st == 1, cenind(censind) tdist transf(c)
Somers' D with variable: _t
Transformation: Harrell's c
Valid observations: 837
Degrees of freedom: 836
Symmetric 95% CI for Harrell's c
------------------------------------------------------------------------------
| Jackknife
_t | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
invshr | .7613652 .0349213 21.80 0.000 .6928214 .829909
------------------------------------------------------------------------------
************************************************** ************************************************
************************************************** ************************************************
Now, I want to perform an internal validation, assessing internally how the results can be generalizater to an indeoendent dataset using bootstrapping with 1000 replications:
. bootstrap, reps(1000) seed(1985): somersd _t invshr if _st == 1, cenind(censind) tdist transf(c)
(running somersd on estimation sample)
Bootstrap replications (1000)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5
.................................................. 50
.................................................. 100
.................................................. 150
.................................................. 200
.................................................. 250
.................................................. 300
.................................................. 350
.................................................. 400
.................................................. 450
.................................................. 500
.................................................. 550
.................................................. 600
.................................................. 650
.................................................. 700
.................................................. 750
.................................................. 800
.................................................. 850
.................................................. 900
.................................................. 950
.................................................. 1000
Somers' D with variable: _t
Transformation: Harrell's c
Valid observations: 837
Degrees of freedom: .
Symmetric 95% CI for Harrell's c
------------------------------------------------------------------------------
| Observed Bootstrap Normal-based
_t | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
invshr | .7613652 .037203 20.47 0.000 .6884486 .8342818
------------------------------------------------------------------------------
************************************************** ************************************************** *************
************************************************** ************************************************** *************
I have two questions regarding this topic:
- Why the observed coefficient is exactly the same in both estimations? (.7613652) Am I doing it in the wrong way?
- Is it possible to create a graph with the c-statistic value in each replication and with the average c-statistic?