Date: Fri, 24 Dec 2010 03:30:30 -0500
Reply-To: Muthia Kachirayan <muthia.kachirayan@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Muthia Kachirayan <muthia.kachirayan@GMAIL.COM>
Subject: Re: how to solve this senario?
In-Reply-To: <201012240711.oBNKSZsl001301@wasabi.cc.uga.edu>
Content-Type: text/plain; charset=ISO-8859-1
Try
page = int(patient / 4) + 1 ;
It assumes that there are 3 observations per patient.
On Fri, Dec 24, 2010 at 2:11 AM, Nway <hymadsk@gmail.com> wrote:
> Hi All,
>
> I have data like
>
> patient n
> 1 1
> 1 2
> 1 3
> 2 1
> 2 2
> 2 3
> 3 1
> 3 2
> 3 3
> 4 1
> 4 2
> 4 3
> 5 1
> 5 2
> 5 3
> 6 1
> 6 2
> 6 3
> ......so on patient value up to 72
>
> i need to create one more variable i.e. page
>
> if patient in ( 1 2 3) then page=1
> multiple of 3- then we can increase one number in page
>
> for example
> if patient le 3 then page=1
> else if patient le 6 then page=2 so on
>
> I want output like ......
>
> patient n page
> 1 1 1
> 1 2 1
> 1 3 1
> 2 1 1
> 2 2 1
> 2 3 1
> 3 1 1
> 3 2 1
> 3 3 1
> 4 1 2
> 4 2 2
> 4 3 2
> 5 1 2
> 5 2 2
> 5 3 2
> 6 1 2
> 6 2 2
> 6 3 2
>
> please help me out this...
>
> Thanks,
> NWAY
>
|