Date: Thu, 25 Nov 2010 13:30:35 -0500
Reply-To: Gerhard Hellriegel <gerhard.hellriegel@T-ONLINE.DE>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Gerhard Hellriegel <gerhard.hellriegel@T-ONLINE.DE>
Subject: Re: how to calculate average for below data?
nway
what does that mean "data like this"? always 8 tnums? Only patid=001? each
obs with aval=23.4? what are group variables, what analysis? aval? In that
case you don't need a datastep, the average is always 23.4!
With that data and without any further description it is not really
possible to see what you need.
Gerhard
On Thu, 25 Nov 2010 07:33:01 -0500, Nat Wooding <nathani@VERIZON.NET>
wrote:
>NWAY
>
>Is there any particular reason that you wish to use the data step for this
>exercise? There are a number of ways to calculate averages in SAS and the
>data step is only one of them.
>
>Nat Wooding
>
>-----Original Message-----
>From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Nway
>Sent: Thursday, November 25, 2010 5:29 AM
>To: SAS-L@LISTSERV.UGA.EDU
>Subject: how to calculate average for below data?
>
>Hi All,
>
> I have a data like
>
> patid side tnum text aval
> 001 left
> 001 1 a1 23.4
> 001 2 a1 23.4
> 001 3 a1 23.4
> 001 4 a1 23.4
> 001 5 a2 23.4
> 001 6 a2 23.4
> 001 7 a2 23.4
> 001 8 a2 23.4
>
> 001 right
> 001 1 a1 23.4
> 001 2 a1 23.4
> 001 3 a1 23.4
> 001 4 a1 23.4
> 001 5 a2 23.4
> 001 6 a2 23.4
> 001 7 a2 23.4
> 001 8 a2 23.4
>
>
>
> i need output like avg of a1,a2 for left and right side using datastep.
>
>
> patid side text avg
> 001 left a1 23.4
> 001 a2 23.4
> 001 right a1 23.4
> 001 a2 23.4
>
> could you plese help me out this.
>
>Thanks,
>Nway
|