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]
st: time averaged exposure in -stcox-
From
Gloria Chi <[email protected]>
To
[email protected]
Subject
st: time averaged exposure in -stcox-
Date
Thu, 18 Oct 2012 21:54:39 -0700
Hello Statalist members,
I have a data set that is in long format and there are multiple
records per participant. For each of these records, there is a
different exposure concentration and the corresponding start time and
stop time (since enrollment) that the participant was exposed. My data
looks like this:
ID no. Exposure Start time Stop time Time to
failure/censor Failure
1 12 1 1200 1200
0
1 15 1201 1500 1500
0
1 10 1501 2000 2000
0
2 20 1 500 500
1
3 33 1 700 700
0
3 40 701 750 750
0
3 12 751 1000 1000
1
4 16 1 300 300
0
4 20 301 900 900
1
I am trying to run a Cox regression but am having trouble with the
exposure. I want to use an average exposure concentration that is time
weighted to the duration of the exposure (as given by the start and
stop times). So at a given failure time, the exposure is the
time-weighted average concentration up until that given failure time.
Secondly, I also want to run a Cox regression with average exposures
over the previous 2 years before a failure and disregard the exposures
that occurred before the previous 2 years.
I have not been able to figure out how to do this in Stata and would
greatly appreciate any advice.
Thank you so much!
Sincerely,
Gloria Chi
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/