Date: Thu, 20 Nov 2003 14:45:41 GMT
Reply-To: LWn <villerwalle.nononospam@YAHOO.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: LWn <villerwalle.nononospam@YAHOO.COM>
Organization: Telia Internet
Subject: Re: Calculating time to an event
I don't have a solution but at least an idea for a start.
Since it looks like every weekvalue is a multiple of 26 I would start using
Proc Transpose to get all values from each ID in the same record.
ID Score26 Score52 Score78 Score104 etc
1 20 20 17 .
2 15 . 18 .
3 12 . 16 15
thereafter a number of IF/THEN could do the rest.
hope it helps a bit
"Candrilli, Sean D." <scandrilli@RTI.ORG> skrev i meddelandet
> Greetings Fellow SAS Users,
> I am new to the group, and have a question that I am hoping someone can
> assist me with. I need to estimate a proportional hazards model, which is
> the easy part. The difficulty lies in the data that I received. I having
> terrible time trying to get the data setup like it needs to be.
> I have something that looks like this:
> ID Week Score
> 1 26 20
> 1 52 20
> 1 78 17
> 2 26 15
> 2 78 18
> 3 26 12
> 3 78 16
> 3 104 15
> My event of interest is a drop in score, and I need to model the DAYS
> (notice that I don't have days here, but rather week of visit) to a drop
> score. To further complicate things, I need to do this for a 1-point
> a 2-point drop, etc, etc. With regards to censoring, for a censored term,
> the time to the event would be the last day seen (which may differ across
> respondents.) Unfortunately I have respondents that skipped visits (ID #3
> above did not come in for the week 52 visit.)
> For ID #1 above I think that the days to events should be as follows (each
> 26 week block is set to 182 days):
> days_1pt_drop = 182 + 182 + 60.7 = 424.7
> days_2pt_drop = 182 + 182 + 60.7 + 60.7 = 485.4
> days_3pt_drop = 182 + 182 + 60.7 + 60.7 + 60.7 = 546
> cens_1pt_drop = 0
> cens_2pt_drop = 0
> cens_3pt_drop = 0
> because clearly these events did happen for this ID.
> Now, for ID #2, who did not experience a decline in score, days should be
> days_1pt_drop = 546
> days_2pt_drop = 546
> days_3pt_drop = 546
> because the last day this respondent was seen was on day 546 (78 weeks X 7
> cens_1pt_drop = 1
> cens_2pt_drop = 1
> cens_3pt_drop = 1
> Ultimately I think that I need a file that looks like this:
> ID days_1pt days_2pt days_3pt cens_1pt cens_2pt cens_3pt
> 1 424.7 485.4 546 0 0 0
> 2 546 546 546 1 1 1
> I apologize for dumping all of this here. I really do not have any idea
> to go about attacking this problem. If this isn't the appropriate forum
> something like this, and someone knows a more appropriate place to post
> this, I would appreciate learning of it.
> Any thoughts or suggestions would be greatly appreciated.
> Kind Regards,