BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
_maldini_
Barite | Level 11

Is there a way to create a 3-way table in PROC FREQ where the 3 variables are all in one table? I know this can be done in PROC TABULATE.

 

In PROC FREQ, when I cross the 3 variables (e.g., tables var1*var2*var3), I get bivariate analyses for var2 and var3 for each level of var1 in a separate table.

 

Thanks.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
data_null__
Jade | Level 19

I think you may want to the TABLE statement options LIST or CROSSLIST

View solution in original post

2 REPLIES 2
data_null__
Jade | Level 19

I think you may want to the TABLE statement options LIST or CROSSLIST

ballardw
Super User

In proc freq the option LIST will place all of the variable on one row with the count and percent similar to a one-way table:

Tables var1*var2*var3*var4 / list ;

 

IF you might have missing values for any of the variables you likely will want to add the MISSING option as well, otherwise combinations of variables that include missing values will not be shown.

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
  • 1438 views
  • 2 likes
  • 3 in conversation