Statalist The Stata Listserver


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

Re: st: time varying variable in Cox regression


From   "Svend Juul" <[email protected]>
To   <[email protected]>
Subject   Re: st: time varying variable in Cox regression
Date   Wed, 28 Mar 2007 10:45:49 +0200

Raoul wrote,

I'm investigating the influence of the number of offspring on cancer
risk. I consider the number of offspring (0, 1, 2 or more than 3) as a
time-varying variable and use Cox regression. I first stsplit after
each date of birth, and generate a variable that contains the
offspring number.

.stset dox, fail(fail) origin(dob) entry(doe) scale(365.25) id(Indexno)
.stsplit child1 , after(dob_child1) at(0)
.stsplit child2 , after(dob_child2) at(0)
.stsplit child3, after(dob_child3) at(0)
.bysort Indexno: gen child_number= _n-1    ///generates variable with
no of offspring
.xi: stcox i.child_number

However, several dates of birth are missing and obviously STATA will
not split the data on these missing dates. For example for some
individuals, the dob for the first child is known, but missing for the
second, and again known for the third. How should I handle such
missing values?
-----------------------------------------------------------------

You could:

1) Drop observations with missing information
or
2) Make a qualified guess about a missing date.

Both principles have merits and drawbacks, but I tend to prefer the
second principle, e.g. assuming that child 2 (with missing date) was
born mid-time between child 1 and 3, child 1 (with missing date) three
years before child 2, and child 3 three years after child 2. With more
than one missing date I would drop the observation.

Just a suggestion, trying to improve an imperfect world.

Svend

__________________________________________

Svend Juul
Institut for Folkesundhed, Afdeling for Epidemiologi
(Institute of Public Health, Department of Epidemiology)
Vennelyst Boulevard 6
DK-8000  Aarhus C, Denmark
Phone: +45 8942 6090
Home:  +45 8693 7796
Email: [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/



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