|Date: ||Wed, 11 Jun 2008 10:37:56 -0700|
|Reply-To: ||lakshmy <globalhealth82@GMAIL.COM>|
|Sender: ||"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>|
|From: ||lakshmy <globalhealth82@GMAIL.COM>|
|Subject: ||DATA step problem - help!|
|Content-Type: ||text/plain; charset=ISO-8859-1|
i posted this before, but have since figured out with the help of a
user that this may be a data step problem.
any help would be appreciated!!
here are a couple examples of the type of data i have - i've tried to
fix formatting, but i'm not sure if it worked; please email me and i
can send a document, as well.
First 'set' of data:
ID TxStartDate TxStopDate 3modate 3moVL 6modate 6moVL 9modate 9moVL
1 11/29/00 2/28/08 2/28/01 420 5/29/01 460
8/1/01 400 11/21/01 50
2 1/10/02 7/17/07 3/28/02 400 7/10/02
90 . . 1/28/03 160
3 9/28/0 6/6/05 12/6/04 240 4/8/05
950 6/6/05 8600 . .
for the same study participants, i have a 'second set' of data
collected as follows:
ID DatePriorToTxStart VL DateFirst<400 VL DateFirst>400 VL
DateSecond<400 VL LastDateonTx VL
1 8/1/00 1840 4/27/01 50
5/29/01 460 8/1/01 400 12/5/07 80
2 11/15/01 . 3/28/02
400 . . .
3 8/26/04 435110 12/6/04 240
4/5/05 950 . . 6/6/05 8600
my objective is to evaluate the time to loss of VL response (TLOVR,
VL>400) in patients starting their first-ever regimen, based on gender
(this is survival analysis, i hope!).
- if the VL never becomes undetectable (VL stays >400 at all times
after TxStartDate, as in ID #3), then TLOVR=0;
- if the VL becomes undetectable, then patient gets lost to follow-up
(ltfu), dies or is switched to another regimen, then TLOVR=date at
ltfu, death or regimen change (i have additional data on this).
-if the VL becomes undetectable then TLOVR is the first time there is
sustained VL rebound (i.e., if there is a DateFirst>400 VL, no
DateSecond<400, and there is a LastDateonTx VL...not in examples
my study period is from 1/1/01 - 12/31/06 (5 yrs). i broke the
measurements up like this just to present them - they are not in two
separate datasets, and indeed are all abstracted from the same
subjects (retrospective chart review). these numbers show sort of the
breadth/characteristics of my data.
1) in some patients, i have no missing data, and have start/stop
treatment dates, and actual dates with corresponding viral loads at
rough 3, 6, 9 mo, etc, intervals, along with the first date VL was
<400, the first date at which VL rebounded >400, date on which 2nd
suppression <400 occurred and last date on treatment and VL (as in ID
#1...never lost VL response, censored at 12/31/06, censor=0).
2) some patients (ID #2) never had a failure (no value for
DateFirst>400, VL for ID #2), and the last date on treatment was
outside the study period (so i hope i'm right in thinking they would
be censored at 12/31/06, censor=0, time=12/31/06-TxStartDate)
3) For ID #3, DateFirst>400 is 4/5/05 and it never goes back down,
with LastDateonTX VL = 8600. So, censor=1, time=DateFirst>400 -
so, i guess my question is:
1) what do i do in the data step so that i may correctly identify (for
example ID #3) that after starting treatment, they lost VL response on
4/5/05 and then never successfully suppressed again? so, i know just
looking at the data that the event occurred on 4/5/05, but in order to
calculate the time-to-event in SAS, i'm not really sure what kind of
statements to use in the data step.
2) or, what the time-to-censoring is in ID #1, who started on
11/29/00, suppressed < 400 on 4/25/01, then had a 'blip' (lost VL
response on 5/29/01), then sustained suppression on 8/1/01 until they
are censored on 12/31/06 (this would count as a 'censor=0', as the
blip was suppressed and the rebound wasn't sustained).
My ideas lead me to think this is an ungodly mess of if/then
statements...I want to start by taking a look at just the 'second' set
of measurements, and from the VLs present, compare all of them and
identify earliest date of VL>400 and compute time-to-event as that
date. Or if there is no loss of suppression, then the last date on
tx=time until censoring, if less than 12/31/06. Here's how i wrote it
if DateFirst>400=. and DateSecond<400=. and LastDateonTx>12/31/06 then
else censor=1 and time=DateFirst>400;
i think i'm missing something major, there - and this is exactly what
i'm having a hard time thinking through.
thank you again for any help you provide!!