```Date: Thu, 2 May 2002 13:38:29 -0400 Reply-To: "Huang, Ya" Sender: "SAS(r) Discussion" From: "Huang, Ya" Subject: Re: Adverse Event - Problem Comments: To: Mohan Menon Content-Type: text/plain Mohan, Combine the number of rel and sev into one, give rel a bigger weight. Assuming the higher the number of sev, the severer is the severity. Also holds true for relationship. For example, if the relation code can be 1,2,3, where 3 is the closest related to drug; severity code can be 1,2,3,4 where 4 is the most severe AE, then we can combine these two number as: comb=rel*10+sev now if you have four cases of AE and all of them have rel=2, the combined number will be 21,22,23,24, all we need to do is to pick the largest number 24, which is the most severe AE. If you have 4 obs, where 3 of them are rel=2, one has rel=3, and sev=1, the largest comb=31, and that's what we want. Since your sample data used formatted sev and rel, I have to use my own proc format to convert them back to numeric. As you mentioned, your sev and rel are already numeric, you only need to make sure they are defined the correct way, otherwise, you may need a transform. proc format; invalue sev 'mod'=1 'sev'=2 ; invalue rel 'unreltd'=1 'reltd'=2 ; data ae; input Pat primary \$ bodysys \$ severe \$ relation \$; nsev=input(severe,sev.); nrel=input(relation,rel.); ncomb=nrel*10+nsev; cards; 1 rash skin mod unreltd 1 rash skin sev reltd 1 rash skin sev unreltd 1 rash skin mod reltd 2 rash skin mod unreltd 2 rash skin sev unreltd ; proc sort; by pat ncomb; data ae; set ae; by pat ncomb; if last.pat; proc print; run; --------------------- Obs Pat primary bodysys severe relation nsev nrel ncomb 1 1 rash skin sev reltd 2 2 22 2 2 rash skin sev unreltd 2 1 12 HTH Ya Huang -----Original Message----- From: Mohan Menon [mailto:mohmenin@YAHOO.COM] Sent: Thursday, May 02, 2002 9:39 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Adverse Event - Problem Hi Everybody I have an issue that I am trying to resolve, please help. Here is the situation Pat primary bodysys severe relation 1 rash skin mod unreltd 1 rash skin sev reltd 1 rash skin sev unreltd 1 rash skin mod reltd The condition is, if a subject has multiple occurences of a primary term, then the event with the most severe intensity within the strongest relationship to study drug should be included. Relationship is the first criteria for selection followed by severity. Therefore I want to pick only the second observation. I am not quite sure on how to accomplish this. Both severity and intensity are numeric variables with formats attached. Thanks for your help. Mohan Menon __________________________________________________ Do You Yahoo!? Yahoo! Health - your guide to health and wellness http://health.yahoo.com ```

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