Hello, My data set includes six months' of data for several different healthcare facilities. I don't need to do any calculations, they've already been performed. I'm using sgplot to create a bar line graph with my bars being individual facility data and the line being the total average data for all facilities. I'm creating a total of 4 graphs for each facility, one for each of the measures I'm looking at. How can I get the data to go through the sgplot so that each facility has all 4 graphs on a page together. I'm able to get 4 graphs on a page, but they're for 4 different facilities, the same data graph, i.e., one page with have 4 graphs for Length of Stay for 4 different facilities, rather than a graph of the 4 different measures for all the same facility. I imagine I need to use a macro, but I'm stuck, as macros are a weakness for me. I'm using SAS 9.4. I've attached a dummy data set and this is the code I'm using: options nodate nonumber orientation=landscape; goptions reset=all device=sasprtc htitle=13pt ftext="Helvetica/bold"; ods _all_ close; ods pdf file='data.pdf' notoc dpi=300 startpage=no; ods graphics / reset=all height=1.7in width=8in; proc sgplot data=snf_complete; title "Average Paid per Day"; vbar Date /response = Average_Paid_Per_Day; vline date/response = Total_Avg_Paid_Per_Day y2axis; by Facility_Name; run; ods graphics / reset=all height=1.7in width=8in; proc sgplot data=snf_complete; title "Average Paid per Discharge"; vbar Date / response = Average_Paid_Per_Discharge; vline date / response = Total_Avg_Paid_Per_Discharge y2axis; by Facility_Name; run; ods graphics / reset=all height=1.7in width=8in; proc sgplot data=snf_complete; title "Average Length of Stay"; vbar Date / response = Average_Length_of_Stay; vline Date / response = Total_Avg_LOS y2axis; by Facility_Name; run; ods graphics / reset=all height=1.7in width=8in; proc sgplot data=snf_complete; title "Readmission Rates"; vbar Date / response = Readmission_Rate; vline Date / response = Total_Readmission_Rates y2axis; by CCN_Facility_Name; run; ods _all_ close; ods listing;
... View more