BookmarkSubscribeRSS Feed
DSF
Calcite | Level 5 DSF
Calcite | Level 5
Hi I was wondering if anyone here has this issue and they can help please.

I am using proc tabulate the show the differences (column percents %) between two groups, in the column, on five metrics, in the row. All variables are coded (1,0). The strange thing is, the first row variable show results only for the 1 values but not the zeros. I am guessing it has to do with the fact that the first row variable has a different N than the following 4 variables. Any ideas as to how to fix it so that the output shows percents for the 1 and 0s for rv1?

Thanks!

Here is the code:

PROC TABULATE;
CLASS RV1 RV2 RV3 RV4 RV5 COLV;

TABLE RV1 RV2 RV3 RV4 RV5, COLV*(N COLPCTN) ;

RUN;
1 REPLY 1
ballardw
Super User
Without data or output I'm guessing. Generally the first thing I look at for CLASS variables and unexpected Ns are missing. Tabulate will exclude records by default that do not have values for all of the class variables. If this sounds possible try adding the option MISSING:

CLASS RV1 RV2 RV3 RV4 RV5 COLV /missing;

If that is the case you will a percent missing indicated in the output.

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

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 1 reply
  • 1018 views
  • 0 likes
  • 2 in conversation