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

st: Re: competing risk modells in stata 8/9


From   Lars Kroll <[email protected]>
To   [email protected], [email protected], [email protected]
Subject   st: Re: competing risk modells in stata 8/9
Date   Tue, 16 Aug 2005 12:17:38 +0200

Dear Layna and Elisabeth,

you both asked about competing risk modells in stata 8 or 9.

I hope this helps:

Intro
=====
I recently tried something similiar. First of all I would suggest to use a kind of st regression modell like cox, weibull (this depends on the possible shapes of all functions, if you don't know it use cox, if it's about mortality try gompertz).

Problem
========
You want to compare different effects of say x1,x2,x3 on different transistions say y0->y1, y1->y0, y0->y2, y1->y2, etc.

Solution
========
You need to stset each transition seperate (and therefore a variable which contains the state_{i,t} = [y0,y1,..]), estimate your modell, store your estimates, and so on..
Using

. est tab ALLYOURSAVEDESTIMATES, eq(1)

you are able to compare the effects

Syntax
======
(Two origin states one destination state, it it very important to specify time0 in the case of competing risk modells..)

// Y=0->Y=1
. stset time if inlist(state,1,0), id(id) ///
failure(state==1)
. sort id _t
. by id: gen time0 = _t[1]
. stset time if inlist(state,1,0), id(id) ///
failure(state==1) time0(time0)
. stcox y*
. est store state_0to1
. drop time0

// Y=2->Y=1
. stset time if inlist(state,1,2), id(id) ///
failure(state==1)
. sort id _t
. by id: gen time0 = _t[1]
. stset time if inlist(state,1,2), id(id) ///
failure(state==1) time0(time0)
. stcox y*
. est store state_2to1
. drop time0

// Results
est table state_* , equations(1)

References:
===========
Box-Steffensmeier and Jones (2004). Event History Modelling. Cambridge. pp.155

Blossfeld, Rohwer (2001). Techniques of Event History 2nd PR. Lawrence Erlbaum Associates, ?.

Mario Cleves, William Gould, Roberto Gutierrez (2004). An Introduction to Survival Analysis Using Stata, Revised Edition. College Station: TX.


--
____________________________
Lars E. Kroll
- Tutor f�r Statistik -

ANSCHRIFT:
Freie Universit�t Berlin
Garystr. 55
14195 Berlin
Raum 202

KONTAKT:
Website www.lkroll.de
*
* 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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index