Hi, I want to produce a barchart of Response Rate by group over time and plot Mean result of another variable over time in the same graph. If I try SGPLOT, SAS give me a warming saying that he expect VLINE statement to have a GROUP option as well.
proc sgplot data=ador;
vbar TPTN / response=xx group=RESP;
vline x=TPTN y=spepbe / y2axis;
xaxis display=(nolabel);
yaxis label='Cumulative Percent of Patients';
run;
Can I do it using Proc template? Can somebody help me?
thanks
Justin
Proc GBARLINE is designed for this.
Based on your YAXIS label, I assume your data is pre-summarized. If so, we have a VBARPARM/hBARPARM that you use instead (assuming you have SAS 9.3 or greater). You would overlay a SERIES with that statement. You code would look something like this:
proc sgplot data=ador;
vbarparm category=TPTN response=xx / group=RESP;
series x=TPTN y=spepbe / y2axis;
xaxis display=(nolabel);
yaxis label='Cumulative Percent of Patients';
run;
Hope this helps!
Dan
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.
Ready to level-up your skills? Choose your own adventure.