|
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: discrete time-varying covariate in cox models
Correct me if I'm wrong, but you can use stsplit to manage the data,
even with covariate values that do not change all at the same time. You
can create a split at each analysis timepoint without harm (day1, day2,
day3...). It may make your survival dataset bulky, but it will manage
the risk-set in the appropriate way.
Paul
Daniel O. Koralek wrote:
Hi Maarten,
Thanks for your note. I'm still somewhat confused on the appropriate
syntax. My covariate doesn't necessarily change at each time point
(i.e. you could have come to a visit but not actually had a screen).
I'm going to show some hypothetical data here (the actual data is
confidential). the screenage variables contain the age at the
corresponding study visit date, and the screen variables contain the
number of screens undergone up to and including that same study
visit. So, I would like my screening covariate to be equal to the
number of screens up to the given analysis time point.
pid iscase entryage exitage screenage0 screenage1
screenage2 screenage3 screen0 screen1 screen2 screen3
1 0 52.0 57.2 52.0 53.1
54.0 55.3 1 2 2 3
2 1 52.5 56.1 52.5 53.7 55.0
55.8 1 2 3 4
3 0 52.4 57.6 52.4 53.4 54.5
56.1 1 2 3 3
....
if i then used this stset command:
stset exitage, failure(iscase==1) enter(time entryage) exit(time
exitage) scale(1) id(pid)
the following stsplit, isn't going to do it...
stsplit, at(failure)
i'm totally lost now. would i need to manually split the data into
multiple records by pid, with entry and exitages corresponding to the
screenage variables and screen variable being the appropriate screen(n)?
Thanks,
Dan
From
Maarten buis <[email protected]>
To
[email protected]
Subject
Re: st: discrete time-varying covariate in cox models
Date
Tue, 13 Nov 2007 10:26:44 +0000 (GMT)
--- "Daniel O. Koralek" <[email protected]> wrote:
> Now, what I would like to do is simply control for a single screen
> variable that equals the number of screens that occurred up to the
> analysis time. THe examples that I have seen using stsplit seem to
> only use a single change (in this scenario, up to a certain point
> screen =0 and after screen = 1), not where multiple changes can
> occur.
If a single change occurs than you create a dummy after -stsplit-, if
you have multiple changes you add multiple dummies, or if you
hypothesis a linear effect, a single continuous variable. In all these
cases -stsplit- doesn't know or cares which scenario applies, it works
in exactly the same way.
-- Maarten
-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands
visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434
+31 20 5986715
http://home.fsw.vu.nl/m.buis/
-----------------------------------------
___________________________________________________________
Want ideas for reducing your carbon footprint? Visit Yahoo! For Good
http://uk.promotions.yahoo.com/forgood/environment.html
*
* 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/
Daniel O. Koralek
Department of Epidemiology/Lineberger Comprehensive Cancer Center
The University of North Carolina at Chapel Hill
Chapel Hill, NC 27599-7435
http://www.unc.edu/~dkoralek/
[email protected]
*
* 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/
--
E. Paul Wileyto, Ph.D.
Assistant Professor of Biostatistics
Tobacco Use Research Center
School of Medicine, U. of Pennsylvania
3535 Market Street, Suite 4100
Philadelphia, PA 19104-3309
215-746-7147
Fax: 215-746-7140
[email protected]
http://mail.med.upenn.edu/~epw/
*
* 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/