Data visualization with SAS programming

Proc Freq FreqPlot with Column Percents

Reply
Frequent Contributor
Posts: 80

Proc Freq FreqPlot with Column Percents

Hello,

I am using PROC FREQ to create some quick summary tables and plots for a large number of variables by two groups (Rx2 tables, e.g. sex*group, race*group, etc.). The options for the PLOTS = FREQPLOT () include a value for the scale as

SCALE=FREQ | LOG | PERCENT| SQRT

However, I would like SAS to graph the column percents rather than the overall percent, because unless the two groups have equal totals, this gives a misleading graph.

For instance:
Group 1 has 30 males out of 100 people.
Group 2 has 30 males out of 50 people.
SCALE = PERCENT graphs both groups as 20% (30/150 total); however, in reality, males account for 30% of group 1, but 60% of group two.
These two groups are not comparable with regard to sex, but the graph makes it appear as if they are.

Any ideas? I suppose I could edit the template, but I'm hoping to avoid that Smiley Happy

Thanks,
Michael
Ask a Question
Discussion stats
  • 0 replies
  • 183 views
  • 0 likes
  • 1 in conversation