Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Stacked Cumulative Incidence Plots

From   千早 ケンジ <>
Subject   st: Stacked Cumulative Incidence Plots
Date   Tue, 14 Dec 2010 01:31:22 +0800

Dear list,

I am estimating a competing risks model using stcrreg for a dependent variable that has two kinds of failure.  Using the following commands: 

stset age_r, failure(homogamy==2) id( serial)
stcrreg i.cohort  i.edu_r  opportunity, compete(homogamy = 1)

Then I predict the Baseline Cumulative Incidence Function using:

predict cif0_homogamy, basecif
gen cif_cohort2_homogamy = 1 - (1-cif_homo_reforms0)^exp(_b[2.cohort]) 

Next I repeat these commands but stset my data for the other possible failure and predict the CIFs for that outcome. 

Then I create the sum of the cause specific CIFs in order to make stacked cumulative incidence plots:

gen sum_cif_cohort1 = cif0_homogamy + cif0_heterogamy
gen sum_cif_cohort2 = cif_cohort2_homogamy + cif_cohort2_heterogamy

The problem is that when I make the stacked cumulative incidence plot I find out that the sum of the CIFs is bigger than 1.00 and the plots show probabilities of 1.65 or more. Am I wrong or these CIFs are supposed to sum to 1.00? What should I do in order to obtain stacked plots showing the probabilities of each type of failure and of no event stacked and summing up to 1.00?

Thanks for your consideration

Guilherme Kenji Chihaya 

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index