Dear Statalist,
I am working on a survival model (long dataset format). The objective is to run a competing-risk regression for the composite outcome (variable 'comp =1 2 3 4 5'), with 'comp==9' as a competing risk.
Variable 'event' represents the label for timepoints of 'date'.
I can run the final model as:
However, when I ran the bootstrap command, it returned this:
I noticed that if I use stcox, the bootstrap worked fine:
Do you have any ideas how to make bootstrapping work with stcrreg? Or did I miss any important options required in order to make boostrapping with stcrreg work?
Thank you.
I am working on a survival model (long dataset format). The objective is to run a competing-risk regression for the composite outcome (variable 'comp =1 2 3 4 5'), with 'comp==9' as a competing risk.
Variable 'event' represents the label for timepoints of 'date'.
Code:
* Example generated by -dataex-. For more info, type help dataex clear input int no byte(age rdm) float date byte(event ptdm) float comp byte acr 1 61 0 18272 1 0 0 . 1 61 0 18303 2 0 0 . 1 61 0 18394 18 1 0 . 1 61 0 19845 7 1 0 0 1 61 0 20137 8 1 0 0 1 61 0 20223 15 1 0 0 1 61 0 20420 19 1 2 0 1 61 0 20487 9 1 2 0 1 61 0 20489 16 1 2 0 1 61 0 22462 23 1 2 0 1 61 0 22691 24 1 2 0 6 52 0 18324 1 0 0 . 6 52 0 18343 2 0 0 . 6 52 0 18508 3 0 0 . 6 52 0 21208 11 0 0 0 6 52 0 21572 12 0 0 0 6 52 0 21943 13 0 0 0 6 52 0 22262 23 0 0 0 6 52 0 23142 24 0 0 0 7 41 0 18336 1 0 0 . end format %td date label values event event label def event 1 "KT", modify label def event 2 "1mo", modify label def event 3 "6mo", modify label def event 7 "4y", modify label def event 8 "5y", modify label def event 9 "6y", modify label def event 11 "8y", modify
Code:
stset date , id( no ) failure( comp ==1/5) origin(event==1) scale(365.25)
Survival-time data settings
ID variable: no
Failure event: comp==1 2 3 4 5
Observed time interval: (date[_n-1], date]
Exit on or before: failure
Time for analysis: (time-origin)/365.25
Origin: event==1
--------------------------------------------------------------------------
7,328 total observations
558 observations end on or before enter()
296 observations begin on or after (first) failure
--------------------------------------------------------------------------
6,474 observations remaining, representing
549 subjects
55 failures in single-failure-per-subject data
3,342.489 total analysis time at risk and under observation
At risk from t = 0
Earliest observed entry t = 0
Last observed exit t = 13.21287
. stcrreg age rdm ptdm acr , compete(comp== 9)
Failure _d: comp==1 2 3 4 5
Analysis time _t: (date-origin)/365.25
Origin: event==1
ID variable: no
Iteration 0: log pseudolikelihood = -269.83536
Iteration 1: log pseudolikelihood = -269.80709
Iteration 2: log pseudolikelihood = -269.80708
Competing-risks regression No. of obs = 5,923
No. of subjects = 541
Failure events: comp == 1 2 3 4 5 No. failed = 54
Competing event: comp == 9 No. competing = 17
No. censored = 470
Wald chi2(4) = 115.67
Log pseudolikelihood = -269.80708 Prob > chi2 = 0.0000
(Std. err. adjusted for 541 clusters in no)
------------------------------------------------------------------------------
| Robust
_t | SHR std. err. z P>|z| [95% conf. interval]
-------------+----------------------------------------------------------------
age | 1.038975 .0125617 3.16 0.002 1.014644 1.063889
rdm | 6.603938 2.20809 5.65 0.000 3.429222 12.71775
ptdm | 2.388427 1.035484 2.01 0.045 1.021128 5.586551
acr | 6.566593 2.450044 5.04 0.000 3.160463 13.64362
------------------------------------------------------------------------------
Code:
bootstrap, noisily reps(10) seed(1): stcrreg age rdm ptdm acr , compete(com
> p== 9)
bootstrap: First call to stcrreg with data as is:
. stcrreg age rdm ptdm acr, compete(comp== 9)
Failure _d: comp==1 2 3 4 5
Analysis time _t: (date-origin)/365.25
Origin: event==1
ID variable: no
Iteration 0: log pseudolikelihood = -269.83536
Iteration 1: log pseudolikelihood = -269.80709
Iteration 2: log pseudolikelihood = -269.80708
Competing-risks regression No. of obs = 5,923
No. of subjects = 541
Failure events: comp == 1 2 3 4 5 No. failed = 54
Competing event: comp == 9 No. competing = 17
No. censored = 470
Wald chi2(4) = 115.67
Log pseudolikelihood = -269.80708 Prob > chi2 = 0.0000
(Std. err. adjusted for 541 clusters in no)
------------------------------------------------------------------------------
| Robust
_t | SHR std. err. z P>|z| [95% conf. interval]
-------------+----------------------------------------------------------------
age | 1.038975 .0125617 3.16 0.002 1.014644 1.063889
rdm | 6.603938 2.20809 5.65 0.000 3.429222 12.71775
ptdm | 2.388427 1.035484 2.01 0.045 1.021128 5.586551
acr | 6.566593 2.450044 5.04 0.000 3.160463 13.64362
------------------------------------------------------------------------------
Bootstrap replications (10)
. stcrreg age rdm ptdm acr, compete(comp== 9)
data with multiple failures per subject not supported by stcrreg
an error occurred when bootstrap executed stcrreg, posting missing values
. stcrreg age rdm ptdm acr, compete(comp== 9)
data with multiple failures per subject not supported by stcrreg
an error occurred when bootstrap executed stcrreg, posting missing values
. stcrreg age rdm ptdm acr, compete(comp== 9)
data with multiple failures per subject not supported by stcrreg
an error occurred when bootstrap executed stcrreg, posting missing values
. stcrreg age rdm ptdm acr, compete(comp== 9)
data with multiple failures per subject not supported by stcrreg
an error occurred when bootstrap executed stcrreg, posting missing values
. stcrreg age rdm ptdm acr, compete(comp== 9)
data with multiple failures per subject not supported by stcrreg
an error occurred when bootstrap executed stcrreg, posting missing values
. stcrreg age rdm ptdm acr, compete(comp== 9)
data with multiple failures per subject not supported by stcrreg
an error occurred when bootstrap executed stcrreg, posting missing values
. stcrreg age rdm ptdm acr, compete(comp== 9)
data with multiple failures per subject not supported by stcrreg
an error occurred when bootstrap executed stcrreg, posting missing values
. stcrreg age rdm ptdm acr, compete(comp== 9)
data with multiple failures per subject not supported by stcrreg
an error occurred when bootstrap executed stcrreg, posting missing values
. stcrreg age rdm ptdm acr, compete(comp== 9)
data with multiple failures per subject not supported by stcrreg
an error occurred when bootstrap executed stcrreg, posting missing values
. stcrreg age rdm ptdm acr, compete(comp== 9)
data with multiple failures per subject not supported by stcrreg
an error occurred when bootstrap executed stcrreg, posting missing values
insufficient observations to compute bootstrap standard errors
no results will be saved
r(2000);
Code:
bootstrap, reps(10) seed(1): stcox age rdm ptdm acr
(running stcox on estimation sample)
Bootstrap replications (10)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5
..........
Cox regression with Breslow method for ties
Bootstrap results
No. of subjects = 541 Number of obs = 5,923
No. of failures = 54
Time at risk = 3,178.0561
Wald chi2(4) = 522.77
Log likelihood = -267.79661 Prob > chi2 = 0.0000
------------------------------------------------------------------------------
| Observed Bootstrap Normal-based
_t | haz. ratio std. err. z P>|z| [95% conf. interval]
-------------+----------------------------------------------------------------
age | 1.041612 .0148074 2.87 0.004 1.01299 1.071042
rdm | 6.674006 1.013341 12.50 0.000 4.956159 8.987272
ptdm | 2.357624 .7253323 2.79 0.005 1.290027 4.308737
acr | 6.452919 2.833782 4.25 0.000 2.728684 15.26016
------------------------------------------------------------------------------
Thank you.

Comment