Date: Wed, 1 Nov 2006 09:24:32 -0500
Reply-To: Jim Groeneveld <jim2stat@YAHOO.CO.UK>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Jim Groeneveld <jim2stat@YAHOO.CO.UK>
Subject: Re: sum of grouped data
Hi Oercim,
This is particularly suited for PROC MEANS, PROC UNIVARIATE, PROC TABULATE,
PROC REPORT, PROC PRINT and possibly more. As you want it only for
presentation purposes I'll give an (*untested*) example using PROC PRINT:
PROC PRINT DATA=YourData; BY Group; SUM RgtMost; RUN;
If this does not directly give you what you want then vary on it by studying
your docs on PROC PRINT. Alternatively I would propose you to study PROC
TABULATE and PROC REPORT.
Regards - Jim.
--
Jim Groeneveld, Netherlands
Statistician, SAS consultant
home.hccnet.nl/jim.groeneveld
On Wed, 1 Nov 2006 05:52:41 -0800, oercim <oercim@YAHOO.COM> wrote:
> Let say I have a data such as
>
> a 12 7
> a 16 8
> b 13 4
> b 15 9
>
> using PROC SAS statements , how can i produce such a table,
>
> a 12 7
> a 16 8
> 15
> b 13 4
> b 15 9
> 13
>where the added rows are the sum of corresponding column of each group(
>a and b are the two groups).Thanks alot.
|