Help using Base SAS procedures

Adding Custom Statistics to Histogram Inset

Reply
Contributor
Posts: 62

Adding Custom Statistics to Histogram Inset

Hi SAS Friends,

Is it possible to add custom statistics to the box in a histogram? i have a few measures that aren't included in the standard output. for example the 'Unequal Weighting Effect' UWE=((CV/100)**2)+1

Have:

proc univariate data=sashelp.heart noprint;

  var weight;

  histogram weight/barlabel=count;

  Title "Distribution of Weight for SASHelp.Heart Dataset";

  inset n='No. Respondents' (comma16.) mean='Mean'(comma16.) Median='Median'(comma16.)  STD='STD'(comma16.) 

  CV='CV'(comma16.4)  Qrange='IQR'(comma16.) max='Max'(comma16.) min='Min'(comma16.) p99='P99'(comma16.)

  p95='P95'(comma16.) p90='P90'(comma16.) /

  header='Summary Statistics'  position=ne height=2;

run;

Want:

proc univariate data=sashelp.heart noprint;

  var weight;

  histogram weight/barlabel=count;

  Title "Distribution of Weight for SASHelp.Heart Dataset";

  inset n='No. Respondents' (comma16.) mean='Mean'(comma16.) Median='Median'(comma16.)  STD='STD'(comma16.) 

  CV='CV'(comma16.4)  Qrange='IQR'(comma16.) max='Max'(comma16.) min='Min'(comma16.) p99='P99'(comma16.)

  p95='P95'(comma16.) p90='P90'(comma16.)

  UWE=((CV/100)**2)+1/

  header='Summary Statistics'  position=ne height=2;

run;

Thanks!

Ask a Question
Discussion stats
  • 0 replies
  • 178 views
  • 0 likes
  • 1 in conversation