Hi all.
I am doing a survival analysis and trying to figure out the cumulative incidence at different time points. But I have no idea about how to produce it. The command I use is as follows:
stset time, failure(outcome=1)
stcrreg drug age male ef nyha, compet(outcome=2)
predict cif0, basecif
predict xb, xb
gen cif1 = 1-(1-cif0)^exp(xb)
sort time
list time outcome xb cif0 cif1 if time ==1 or time ==2 or time ==3
Could anyone help check this command, please? Thank you very much!
Li
I am doing a survival analysis and trying to figure out the cumulative incidence at different time points. But I have no idea about how to produce it. The command I use is as follows:
stset time, failure(outcome=1)
stcrreg drug age male ef nyha, compet(outcome=2)
predict cif0, basecif
predict xb, xb
gen cif1 = 1-(1-cif0)^exp(xb)
sort time
list time outcome xb cif0 cif1 if time ==1 or time ==2 or time ==3
Could anyone help check this command, please? Thank you very much!
Li
Comment