Date: Mon, 8 Sep 2008 09:56:14 -0700
Reply-To: jn_mao@yahoo.com
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: jn mao <jn_mao@YAHOO.COM>
Subject: Data processing problem
In-Reply-To: <eedeb67f-13c6-4a23-b3db-d20bdb337c14@a70g2000hsh.googlegroups.com>
Content-Type: text/plain; charset=iso-8859-1
Hi SASLs,I have a large dataset. I need to calculate the duration by each two connected dates bydrug for each patient, then divided by NT. Only select the 2nd data of NT to divide duration. My data:ID date drugname NTaa 1/2/08 xx 10aa 2/1/08 xx 14aa 2/3/08 yy 11aa 3/1/08 xx 15aa 3/2/08 yy 16The data I want:ID duration drugname NT NT_duraa 31 xx 14 14/31aa 28 xx 15 15/28aa 29 yy 16 16/29 The duration is the difference of two connented dates for the same drug.like drug xx first data: 31=2/1/08-1/1/08.Thanks much.Jane
|