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

Re: st: Survival analysis

From   Maarten buis <>
Subject   Re: st: Survival analysis
Date   Sun, 30 Aug 2009 22:44:17 +0000 (GMT)

--- On Sun, 30/8/09, moleps islon wrote:
> I´m investigating the effect of a dichotomous variable on
> survival. Looking at the graphs they are parallell after 
> the first 48 hrs, but there is a difference within the
> first 48 hrs. Is it reasonable to present the cox
> regression analysis with all the patients and then
> discard the patients dead within 48 hrs and redo the
> analysis-(this gives a significant effect in the first
> analysis and non-significant in the latter as suspected
> from the graphs)? Or is there a more analytical way to find
> the exact time from which the two groups no longer differ?

I would do something like in the example below. In this example
the effect of age is allowed to change linearly over time for 
the first 10 months, and afterwards the proportional hazard
assumption is maintained. The trick is that -(_t < 10)- is a 
logical statement, so it evaluates to 1 if it is true, and 0 
if it is false (for more on this, see: ). So
for the first 10 months age is interacted with 1*_t, while for
the remaining months age is interacted with 0*_t. The effect 
age in "rh equation" is the effect of age after 10 months, i.e.
after 10 months the hazard of death increased 12% for every 
year of age. The effect of age in t equation tells you that in 
the first 10 months the effect of age increased every month by 

*--------- begin example -----------
sysuse cancer, clear
stset studytime, failure(died)
xi: stcox i.drug age, ///
    tvc(age) texp((_t < 10)*_t)
*---------- end example -------------
( For more on how to use examples I sent to statalist see: )

Hope this helps,

Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen


*   For searches and help try:

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