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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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