BookmarkSubscribeRSS Feed
tahoora
Calcite | Level 5

hello, I am new in sas

nowadays, I am learning proc tabulate and I have  orion as dataset.

please tell me ,in orion tables which one more suitable for working with proc tabulate .

 

p.s:I know all of them work with it.but if you have an experience with one of them as a Lerner then answer me.

 

2 REPLIES 2
Reeza
Super User

Are you trying to practice PROC TABULATE with the ORION data set?

If you're looking to practice PROC TABULATE concepts see the examples which are thoroughly documented:https://documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.4&docsetId=proc&docsetTarget=p13k5zc...

Cynthia_sas
Diamond | Level 26

Hi:
Almost all of our SAS Programming classes use the ORION library. The class where we teach PROC REPORT and PROC TABULATE has data that we use for creating crosstabular tables. But, you don't need the ORION data specifically for PROC TABULATE, any data where you want to product cross-tabular reports -- with calculated statistics can be used. Some examples that I have used from SASHELP library are: SASHELP.CLASS, SASHELP.HEART, SASHELP.SHOES and SASHELP.PRDSALE.

Here are some examples using SASHELP datasets:

** SASHELP.CLASS;
proc tabulate data=sashelp.class;
  title '1) SASHELP.CLASS';
  class sex age;
  var height weight;
  table age*sex all='Summary',
        height*(mean median) weight*(mean max) all='Count'*n;
run;

** SASHELP.HEART;
proc format;
  value agefmt low-<50='under 50'
               50-<70='under 70, over 50'
			   70-high='over 70';
run;
  
proc tabulate data=sashelp.heart;
  title '2) SASHELP.HEART';
  class chol_status ageatdeath;
  table ageatdeath all,
        chol_status*n all;
  format ageatdeath agefmt.;
run;

** SASHELP.SHOES;
proc tabulate data=sashelp.shoes;
  title '3) SASHELP.SHOES';
  class region subsidiary product;
  var sales;
  tables region*subsidiary all,
         Product*sales*(n mean) all*sales*(N mean);
run;

** SASHELP.PRDSALE;
proc tabulate data=sashelp.prdsale;
  title '3) SASHELP.PRDSALE';
  class country region prodtype;
  var actual predict;
  tables country,
         region all,
         prodtype*(actual*sum predict*sum);
run;
title;



Cynthia

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

SAS Training: Just a Click Away

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

Browse our catalog!

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