Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: stset with different start times


From   Lars Folkestad <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: stset with different start times
Date   Wed, 26 Sep 2012 14:09:56 +0200

Dear list

I figured it out:

Firstly i generated a "at risk date" that was equal to birth date if born
after 1977 and 1th jan 1977 if born prior to 1977

Then i used the following:

stset D_DOD, failure(died) origin(time bdate) enter(time r_date)
scale(365.25)


Where
D_DOD = date of death/31th of dec 2009
died is died within the study time
Bdate is the time of birth
r_time is the "at risk date"

This should handle the left truncation problem.

Please correct me if thats all wrong.

lars  

Den 26/09/12 13.18 skrev "Lars Folkestad" <[email protected]>:

>Dear list
>
>I know this has been asked before, but i cannot see how to apply it to my
>data.
>
>I have date from a register where cases can be entered if they are
>diagnosed between 1977-2009. Patients are entered at the time of
>diagnosis NOT the time of birth.
>
>I am interested to draw a Kaplan-Meier curve for the patients in the
>register. My problem is that to avoid bias due to left truncation i want
>to enter the patients born prior to 1977 at their age in 1977 and NOT
>their time of birth.
>
>My variable names are:
>
>
>Date of birth = dob
>Date of death=dod
>Age at death/end of study = d_age
>Age at 1977 (given born prior to 1977) = age_77
>
>
>What i have done so far is:
>
>.gen d_age = dod - dob
>.gen byte died = dod < mdy(31,12,2009)
>.stset age, died(died) scale(365.25)
>
>But this does not take into account the above.
>
>Thank you for your help.
>
>Lars
>
>*
>*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index