Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: adjustfor() command for survival curves causes problems


From   "Soremekun, Seyi" <[email protected]>
To   <[email protected]>
Subject   st: adjustfor() command for survival curves causes problems
Date   Thu, 6 Dec 2007 17:18:40 -0000

I'm trying to create Kaplan Meier plots using time to infection with a
particular disease (in days) in a cohort of dogs as my event variable. 
I want to adjust for the age of the animals at the time when they became
infected, and also for the sampling round date at the time of infection.

For some reason when I add 'date' to the adjustfor command:
adjustfor(age date) - I get a single straight failure at the start.
'Age' alone is fine- but 'date' alone throws up the same problem. I've
tried this with date in string, numerical and date form and neither is
any better.
Is this a problem that sounds familiar to anyone?

Here is an example of my data if it helps at all:

dogID		survival time	age	date@failure
1			4		0.5	12/04/93 (in any format)
2			258		1.0	04/09/94 (")
3			82		0.8	24/07/93 (")
etc.

Code:
sts graph, name(all) adjustfor(age date) xtitle(days in field) ///
title(" ") ytitle(probability T>t)


Cheers,

Seyi



Seyi Soremekun
Infectious Disease Epidemiology
Biological Sciences Department
University of Warwick CV4 7AL
+44 02476522473



*
*   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