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?
Thanks
HR
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Maarten buis
Sent: Friday, May 22, 2009 3:24 AM
To: [email protected]
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
-----------------------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany
http://home.fsw.vu.nl/m.buis/
-----------------------------------------
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/