BookmarkSubscribeRSS Feed
bc1
Calcite | Level 5 bc1
Calcite | Level 5

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;

2 REPLIES 2
ballardw
Super User

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.

Cynthia_sas
SAS Super FREQ
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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 1817 views
  • 0 likes
  • 3 in conversation