BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
grateful
Calcite | Level 5

Hi all,

 

This is a very simple question. 

 
my data is structured so that each clinician has a set of visits with a dummy variable for imaging. I am able calculate the clinician specific rate (denominator=visits, the numerator=images ordered during visit), but I can’t figure out how to get the summary statistics of the overall per-clinician rates.  
 
  I am currently using proc means….this code gives me the rate (with the mean statistic), but I want to calculate the overall mean and interquartile ranges across these individual means.  does that make sense?  should I create a new variable?
 
proc means DATA=out.lbp_NP_spec_flagREVIS;
where np_gen75=1;
class image_rfr_npi;
var x_ray_mri_flag;
output out=all_lvi_rates_NP ; 
run;
 
thanks for your help!
 
Monica
1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User
Check your output data set. Since you don't specify NWAY, there should be two _type_ values. One is overall, and one is for each clinician.

View solution in original post

3 REPLIES 3
Reeza
Super User
Check your output data set. Since you don't specify NWAY, there should be two _type_ values. One is overall, and one is for each clinician.
grateful
Calcite | Level 5

Great--I see that now.  How do I find the interquartile range (min q1 median q2 and max)?  do I need to create a new variable via the out put statement and then run a separate proc means on that?

 

proc means DATA=out.lbp_NP_spec_flagREVIS mean=rate;
where np_gen75=1;
class image_rfr_npi;
var x_ray_mri_flag;
output out=all_lvi_rates_NP ; 
run;
 
Thanks!
 
Monica
Reeza
Super User
You control the stats on the OUTPUT statement. Add all the statistics you want to that line with an = after the word, ie


output out=.... mean= min= max= Q1= median= / autoname autolabel;

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 863 views
  • 0 likes
  • 2 in conversation