Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

st: stset with different start times


From   Lars Folkestad <lfolkestad@health.sdu.dk>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: stset with different start times
Date   Wed, 26 Sep 2012 13:18:53 +0200

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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index