BookmarkSubscribeRSS Feed
estith
Calcite | Level 5

What would the code look like for this: Tabulate levels of Weight_StatusNew grouped by Weight_Stat /

I am not sure how to represent variables by group. Thank you.

2 REPLIES 2
PaigeMiller
Diamond | Level 26

I think we need a lot more information.

 

Can you describe these variables? Can you show us EXAMPLES of what each variable contains? What type of table do you want? What would be in the cells of the table?

--
Paige Miller
ballardw
Super User

Best practice on this forum is to provide an example of your data, or use one of the SAS supplied training data sets such as SASHELP.CLASS that are installed. Then show what kind of expected output for the given data set is desired.

You provide data in the form of data step code, open a text box on the forum using the </> icon that appears above the message window and paste the code.

 

One of the basic procedures to "tabulate", assuming counts are what you are looking for is Proc Freq. Something like:

Proc freq data=thenameofyourdatasetgoeshere;
   tables Weight_stat * Weight_StatusNew;
run;

The * between two variables means do a cross tabulation with the first variable as row heading the second as a column heading.

 

 

sas-innovate-white.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.

 

Early bird rate extended! Save $200 when you sign up by March 31.

Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

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