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 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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