BookmarkSubscribeRSS Feed
Ronein
Meteorite | Level 14

Hello

I want to create a summary frequency table .

The table will include 3  categorical variables.

In the summary table there is interaction between two categorical variables

Please see attach the table (how should it look like)

Let's say that there are 3   categorical :Z1,Z2,Z3

Can anyone show by proc tabulate and proc report how to produce this summary report?

 

2 REPLIES 2
mkeintz
PROC Star

I'd suggest you study this example using data from sashelp.cars:

 

data have;
  set sashelp.cars;
  where make in ('Acura','Audi','Chevrolet');
run;

proc tabulate data=have;
  class make type origin;
  tables make * type all='TOTAL'
         ,
		 (origin all='TOTAL')*N=' '*f=8.0;
run;
--------------------------
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set

Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets

--------------------------
PaigeMiller
Diamond | Level 26

Some of us will not (or cannot) download Microsoft Office attachments, as this is a security risk.

 

Please show the desired output via screen capture, included in your reply via clicking on the Photos icon.

--
Paige Miller

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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