Help using Base SAS procedures

Proc Tabulate issue

Reply
Occasional Contributor DSF
Occasional Contributor
Posts: 7

Proc Tabulate issue

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;
Super User
Posts: 11,343

Re: Proc Tabulate issue

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.
Ask a Question
Discussion stats
  • 1 reply
  • 91 views
  • 0 likes
  • 2 in conversation