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

RE: st: Survival between groups

From   "Hugh Robinson" <>
To   <>
Subject   RE: st: Survival between groups
Date   Fri, 22 May 2009 10:53:01 -0600

Thanks Maarten.

I had stset the data using date as the time variable.  

stset date1, id(lion_id) failure(event==3) enter(event==1) origin (time d(01Jan1998)) exit(time d(01Jan2007))

Group 1 is part of the analysis from Jan 1 2001 to Jan 1 2005
Group 2 Jan 1 2005 to Jan 1 2007.

Are you suggesting I add a new time variable for each group?  Can I do that with stsplit?



-----Original Message-----
From: [] On Behalf Of Maarten buis
Sent: Friday, May 22, 2009 3:24 AM
Subject: Re: st: Survival between groups

--- On Fri, 22/5/09, Hugh Robinson wrote:
> I have two groups followed across different time
> periods.  I would like to test for a difference in 
> survival between groups. 
> It is my understanding that sts test will not work
> because the survival curves are for different
> periods (observed and expected events are exact and
> therefore p=1.0).  

As long as you used -stset- correctly the period 
should not matter and you should just be able to use
-st test-. All that matters is the time till a certain
event, that the initial time is different for different
groups (this is how I read "the curves are for 
different periods") is irrelevant, you just need to 
make sure that Stata knows which starting time to use
for which observation (this is what I mean with "use 
-stset- correctly").

Hope this helps,

-- Maarten

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


*   For searches and help try:

*   For searches and help try:

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