In SAS 9.4, I have a proc tabulate data block that produces a table of row percentages. I need a new column at the end that displays the total count of the row in the table. I'm getting an error about mixed/multiple statistics: "ERROR: There are multiple statistics associated with a single table cell in the following nesting: All * RowPctN * f * All * Sum." PROC TABULATE DATA = CHSS2017_s1 f=10.2 S=[just=c cellwidth=75];
CLASS AGE SEX Q21;
CLASSLEV AGE / style=[font_weight=medium];
CLASSLEV SEX / style=[font_weight=medium];
CLASSLEV Q21;
*FREQ REGIONWT;
TABLE ALL = 'Greater Cincinnati Residents' * (ROWPCTN=' '*f=PCTF.)
AGE = 'Age' * (ROWPCTN=' '*f=PCTF.)
SEX * (ROWPCTN=' '*f=PCTF.)
, Q21 all=' '*sum;
RUN; How can I replicate the table shown in this ticket? All three variables (age, sex, and q21) are categorical variables; the values for age and sex by q21 should be row pct, but each group within age and sex should have its own row count at the end of the table.
... View more