LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (May 2005, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 10 May 2005 09:48:28 -0400
Reply-To:     Ben <benpub7@YAHOO.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Ben <benpub7@YAHOO.COM>
Subject:      Re: Multiple record data problem and survival analysis

according your explain,you need final analysis data which one subject is with one observation which has the youngest diagnose age (actually the youngest age, for no cancer pt).

*****************************; proc sql; create table a as select subject,min(agediagnosis) as age from snapshot group by subject;

create table final as select a.*,b.icdcode from a,snapshot as b where a.subject=b.subject and a.age=b.agediagnosis;

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

On Mon, 9 May 2005 12:11:30 -0700, Neerav Monga <neerav.monga@GMAIL.COM> wrote:

>Hi Everyone, >I am stuck on this problem and was hoping someone can help. Here is the >problem: > >I have a varying number of records per patient, an age of diagnosis for >the disease and a diagnosis code number (i.e. ICD codes that start with >153 or 154). I am interested in developing a survival analysis model >with time to disease as my main outcome. > >The issues that make this confusing are: a) each subject has multiple >icd codes, however I only want those that have a particular disease >(e.g. cancer) b) If a person has multiple cancers (ie. icd starts with >153/154) I want to select the record with the youngest age of onset of >cancer (since I am predicting time to 1st cancer) c) some subjects do >not have cancer at all, yet have multiple records and I want to select >those with the youngest age (just to keep my coding rules consistant). > >Data Snapshot: > >subject agediagnosis icdcode >4979 64 1841 >4979 62 1741 >3673 42 1820 >3673 72 1539 >1989 70 1531 >1989 71 1889 >2989 60 1531 >2989 71 1549 > >I hope this is clear, my goal is to have one record per observation >fitting the various criteria i've explained. Thanks a lot for any >suggestions in advance. > >Cheers, > >Neerav


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