Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Competing Cause Mortality


From   May Boggess <mboggess@stata.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Competing Cause Mortality
Date   02 Jun 2004 13:06:29 -0500

On Wednesday, Shawn asked about competing risks analysis:

> I am trying to do an analysis of competing-cause mortality. I have a
> mortality dataset where I have death (yes/no) and among those who died,
> whether it was a specific type of death (yes/no).

> Initially, I used stset with any-cause death as my failure, then repeated
> the analysis with type-specific death as failure. I've been told that's
> incorrect, because it treats those who died from another cause as just being
> censored, and doesn't allow me to examine whether my exposure of interest
> also increases the non-specific cause of death. I was told I need to do
> competing-cause mortality, to see how my exposure impacts both the
> type-specific and the other causes of death.

Tero Kivela gave the following suggestions:
> 
> Enzo Coviello's very handy -stcompet- ado-file will solve your problem if
> you need a Kaplan-Meire type analysis. If you need an equivalent of 
> Cox regression, Stata doen not help you (yet). 
 
It is possible to use Cox regression for competing risks in Stata. 
There is a very nice paper by Lunn and McNeil 
"Applying Cox regression to competing risks" Biometrics 51, 524-532, June 1995.
They go through a number of different methods, none of which is the method
mentioned in the multiple risk FAQ. 

Below is the example from a response to a Statalist question I gave
a few weeks go. 

Here I will give examples of the different methods. I am going to keep
it relatively simple by sticking to non-repeated failures, in other
words, each subject is either censored or suffers one event, which in
this example will be one of two types.

First I need to create an appropriate dataset. I will begin with the
following:

 clear
 sysuse cancer
 set seed 12345
 drop died
 gen id=_n
 move id st
 gen death=int(uniform()*3)
 list

Here death=0 is censored and 1 and 2 are the competing events.

For competing risks is that we need one record for each failure type for
each subject. This is the "expanded" dataset. Continuing where we left
off:

 expand 2
 bysort id : gen type = _n
 gen status=(type==death)
 recode type (1=0)(2=1)
 list, sepby(id)
 stset studytime, f(status) 

Now we have two records per subject and status is our failure variable.
For each subject, having two zeroes means censored. We have the
following choices for models:

 * risk type as covariate with interactions (Lunn & McNeal Method A) 
 gen aget=age*type
 gen drugt=drug*type
 stcox type drug age drugt aget, nolog nohr cluster(id)
 estimates store methodA

 * risk type as covariate with interactions only (Lunn & McNeal Table 2)
 stcox type  drugt aget, nolog nohr cluster(id)
 estimates store table2

 * risk type as strata (as in FAQ)
 stcox drug age, strata(type) nolog nohr cluster(id)
 estimates store faq

 * risk type as strata with interactions (Lunn & McNeal Method B)
 stcox drug age drugt aget, strata(type) nolog nohr cluster(id)
 estimates store methodB


I have saved the estimates from each of the models so that if I wanted
to compare them I could do so as follows:

 estimates table _all, stats(aic bic)

-- May
mmb@stata.com

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index