Dear Stata Listers,

I wish to evaluate the effect that local recurrence has on the risk of ocular melanoma. My cohort includes 4164 subjects; 151 subjects have had a recurrence.

I am new to competing risks analysis and after reading the Stata manual and several posts in this forum, I am in need of advice regarding the best commands to use (I've used stcrreg), how to include a non-continuous time-varying covariate in the model (I've used stsplit), and if it's possible to generate cumulative incidence in tabular form after stcurve (similar to using sts list to obtain survival (or failure) estimates). It is not clear to me how I would do this from the research I've done. I'd like to report probability of death from melanoma & 95% confidence intervals at 5, 10, 15 and 20 years after diagnosis.


Variables:
recur_grp: 0=no recurrence 1=recurrence
t_recur: years between melanoma diagnosis and recurrence
stat: last known status - 1=alive 2=deceased
t_stat: years between melanoma diagnosis and stat
AJCCclass: 1=T1 2=T2 3=T3 4=T4
age_rx: age at the time of diagnosis/treatment

Code:
input float(recur_grp t_recur stat t_stat) str3 AJCCclass float age_rx
0         . 2  2.817248 "T3a"   46.9514
0         . 2 28.082136 "T2a"  43.46612
0         . 1 35.118412 "T2a"  54.20671
1  48.71711 2  7.542779 "T4a"  54.61191
0         . 2 1.9575633 "T3a"  56.11225
0         . 2 13.774127 "T1a" 69.957565
0         . 2  21.82067 "T2a"  66.53525
0         . 2 1.9876797 "T4b"  62.03422
0         . 2  7.132102 "T2a"  66.13278
1    65.625 2  25.41273 "T2a"  39.55099
0         . 2  1.724846 "T4b"  75.14853
0         . 2 20.120466 "T3a"  74.75428
0         . 2 2.2806296 "T3b" 65.886375
0         . 2 1.6372348 "T2a" 74.236824
0         . 2   3.59206 "T2d"  49.29774
0         . 1 35.446953 "T1a"  53.78508
0         . 2  29.71663 "T3a"  48.89254
0         . 2 35.088295 "T1a" 37.278576
0         . 1 35.471596 "T2a"  52.95277
0         . 2 25.308693 "T2a" 67.671455
end


I used stcrreg to calculate the probability of dying from melanoma associated with recurrence using the following code:

/// create indicator variables for outcomes: censored=alive, UMdeath=death from melanoma (outcome of interest), otherdeath=death from other causes (cpeting risk)

gen censored=1 if stat==1
replace censored=0 if stat==2

gen UMdeath=1 if cod==1 | cod==13
replace UMdeath=0 if cod~=1 & cod~=13


gen otherdeath=1 if cod==2 | cod==3 | cod==4
replace otherdeath=0 if cod~=2 & cod~=3 & cod~=4


//recur - timevarying covariate - split records by recurrence status //
replace yr_recur = 15000 if recur_grp== 0
stset t_stat, failure(UMdeath) id(case)

stsplit postrecur, after(yr_recur) at(0)
replace postrecur = postrecur + 1

replace otherdeath=. if postrecur==0 & recur_grp==1
replace censored=. if postrecur==0 & recur_grp==1


xi: stcrreg postrecur i.ajcc_cat age_rx, compete(otherdeath)


// CIF by recurrence and AJCC classification
stcurve, cif at(postrecur= (0 1) _Iajcc_cat_2=0 _Iajcc_cat_3=0 _Iajcc_cat_4=0)
stcurve, cif at(postrecur= (0 1) _Iajcc_cat_2=1 _Iajcc_cat_3=0 _Iajcc_cat_4=0)
stcurve, cif at(postrecur= (0 1) _Iajcc_cat_3=1 _Iajcc_cat_2=0 _Iajcc_cat_4=0)
stcurve, cif at(postrecur= (0 1) _Iajcc_cat_4=1 _Iajcc_cat_3=0 _Iajcc_cat_2=0)

Is there a way for me to generate a table of the CIFs with 95% confidence intervals from these curves?

Thanks very much for your help.

Anne Marie