Help using Base SAS procedures

Proc Report - Stacking Multiple Group Variables

Reply
Regular Learner bc1
Regular Learner
Posts: 1

Proc Report - Stacking Multiple Group Variables

I need to compute the same stats grouped by several different variables. The code below produces exactly what I need for one variable but I'd like to add a groupvar2 with results appended at the bottom. I haven't been able to find anything, and I'm trying to avoid Proc Tabulate. Any ideas??? 

 

proc report data=data1 nowd;
column groupvar1 PL,(n pct) Score_,median;
define groupvar1 / group;
define PL / across format=$plfmt.;
define Score_ / analysis;
run;

Super User
Posts: 11,335

Re: Proc Report - Stacking Multiple Group Variables

If you are going to do something like calculations with the column values then tabulate isn't the answer. But if that is not the case what is the problem with using tabulate? Multiple nestings is a tabulate strength.

SAS Super FREQ
Posts: 8,861

Re: Proc Report - Stacking Multiple Group Variables

Hi: Take a look at this paper. http://www2.sas.com/proceedings/forum2008/173-2008.pdf I think what you are describing is Example 1 and Example 8.

For these example, however, the statistics were pre-calculated.

cynthia
Ask a Question
Discussion stats
  • 2 replies
  • 266 views
  • 0 likes
  • 3 in conversation