Help using Base SAS procedures

proc univariate histogram

Posts: 0

proc univariate histogram

I'm using the histogram statement in proc univariate to produce clinic-specific graphs of the distribution of patient weights (for example). On each histogram, I've added a normal curve to show the overall distribution of all the clinics. I would like to shade the parts of the histogram bars that lie above the normal curve. Is there some trick to do this?

Also, on the same graphs, the clinic name on the vertical axis is being cut off after only 15 characters. I cannot get it to display the entire name. Any idea why that is? Or how to fix it?

Thanks so much for any suggestions or ideas you can offer!!

This is the code I've been working with, if that helps:

data test;
infile "...";
attrib clinicname length=$60;
input id $ clinicname $ weight; run;

proc univariate data=test;
class clinicname;
histogram weight / endpoints = 50 to 350 by 25
normal(color=black noprint mu=140 sigma=30)
vaxis=0 to 100 by 10
vaxislabel=' Percent of Patients '
inset n median(5.2) mean(5.2) std='Standard Deviation'(5.2) / position=(3,85);
title 'Distribution of Patient Weight';
Ask a Question
Discussion stats
  • 0 replies
  • 1 in conversation