BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hello everyone,

I wish to use the method PROC MEANS to obtain a table that looks like so:

Region N_obs Variable Mean Std_Dev Min Max
Africa 10 V1 1 2 3 4 5
V2 6 7 8 9 10
Asia 2 V1 11 12 13 14 15
V2 16 17 18 19 20


So I used the BY statement but i get something like this:
---------Region : Africa---------------
Variable N Mean Std_Dev Min Max
V1 1 2 3 4 5
V2 6 7 8 9 10

---------Region : Asia---------------
Variable N Mean Std_Dev Min Max
V1 11 12 13 14 15
V2 16 17 18 19 20


I have looked here http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/a000146729.htm but cannot seem to find what I'm looking for.

(sorry for the bad indenting. V1 and V2 and meant to be aligned in the first table)
2 REPLIES 2
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
With PROC MEANS, generate an output file (use NOPRINT), and then use PROC PRINT to generate a suitable report, most likely using the ID statement I would say.

Scott Barry
SBBWorks, Inc.
Doc_Duke
Rhodochrosite | Level 12
The CLASS statement in MEANS will line it up the way you want.

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
  • 577 views
  • 0 likes
  • 3 in conversation