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.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

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