BookmarkSubscribeRSS Feed
Ronein
Onyx | Level 15

Hello

May anyone show a code that create this type of report.

Is it posible to do it via proc report in one step?

Is it posible to do it via proc tabulate in one step?

Is it posible to do it via proc univariate in one step?

 

thanks

 

6 REPLIES 6
PaigeMiller
Diamond | Level 26

Hello

 

By now, since you have been in the Communities for several years, you must know that many of us will not download attachments, and if you want to show us the desired output, show us a screen capture (but do not use screen captures for data or code or logs).

--
Paige Miller
Ronein
Onyx | Level 15

Sure, please see here

Ronein_0-1638336347508.png

 

PaigeMiller
Diamond | Level 26

@Ronein wrote:

Sure, please see here

Ronein_0-1638336347508.png

 


As a "thinking out of the box" solution, have you considered creating side-by-side box plots of these variables and geographic locations? A box plot shows the distribution (mean, standard deviation, upper and lower quartiles, median and p90) for each geographic region as a picture rather than a table, and would be very simple to produce, and is relatively easy to understand. Example

--
Paige Miller
ballardw
Super User

Proc tabulate would not have the variable repeated on the rows, just once but

 

Proc tabulate data = have;
   class country;
   var height weight iq;
   table (height weight iq) *(mean std q1 median q3 p90 ),
            country
   ;
run;

Proc Report really dislikes multiple statistics in a single column and would require you do more coding.

Tabulate will not do all of the quantile statistics that proc means/summary and univariate can but does do many of the commonly used 1,5,10,20,30,...90, 95,99 plus the quartiles.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 6 replies
  • 1410 views
  • 2 likes
  • 4 in conversation