LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (February 2008, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 14 Feb 2008 16:52:59 -0500
Reply-To:     Ben <benpub7@YAHOO.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Ben <benpub7@YAHOO.COM>
Subject:      Re: help with data manipulation
Comments: To: George D <gd_303@YAHOO.COM>

Hi George,

survial analysis? I recalled there are a way to pick time interval in PROC PHREG directly. but I forgot to do it....

best regards,

*************************************************; proc sort data=dt out=dt_; by id; run;

data dt_a; set dt_; by id; output; if last.id=1 and first.id=0 then do; if dt2>chdt then output; end;

run;

proc sort data=dt_a out=dt_a_; by id; run;

data dt_a_a; set dt_a_; by id;

lagdt1=lag(dt1); lagdt2=lag(dt2); lagchdt=lag(chdt);

if first.id=last.id and first.id=1 then output;

if first.id=1 and last.id=0 then do; dt2=chdt; typ1=typ2; output; end;

if last.id=0 and first.id=0 then do; dt1=lagchdt; dt2=chdt; typ1=typ2; output; end;

if last.id=1 and first.id=0 then do; dt1=lagchdt; output; end; drop lag: typ2 chdt; run;

******************************************;

>hope i am not too confusing... >any help would be welcome.. > >regards >george >


Back to: Top of message | Previous page | Main SAS-L page