Hi Stata forum,
I would like to estimate the cumulative incidence proportions with a competing risk (CIF)(and 95%CI) among my exposed(exp==1) and non-exposed(exp==0) according to a long list of covariates after 5-years follow up. My event of interest is event==1, whereas my competing risk is event==2.
So far I have used the following syntax to make up a cumulative incidence graph:

Stcompet cif=ci hilim=hi lowli=lo, compet(2) by(exp)
gen cif_exp1=cif if event==1 & exp==1
gen cif_exp0=cif if event==1 & exp==0
graph twoway line cif
_exp* _t, connect(JJ)


Lets say I would like to calculate the 5-year CIF for males only(sex==1) among the exposed. I have done this the following way:
gen c2=cif if event==1 & exp==1 & sex==1
sort _t
replace c2=c2[_n-1] if mi(c2)

The same is done for the lower and higher 95%confidence limits.


I have also used the stcomlist command to do the same:

stcomlist if sex==1, compet1(2) at (1 5) by(eks)

However, I do not get the same estimates. Which procedure is the better or does there exist another less time-consuming way to do it?

Hope somebody will help me out and apologies if explanation is a bit unclear.

Best regards Kirsten