Hello,
I'm trying to overlay two scatterplots; one for bmi & days to transition and one for age & days to transition. I then want to draw a best fit line through them with results from my regression analysis.
I've tried the following code
proc template;
define statgraph standard;
begingraph;
entrytitle "Model Transition days by Age and BMI";
layout overlay;
scatterplot x=transition y=age;
scatterplot x=transition y=bmi;
endlayout;
endgraph;
end;
run;
proc sgrender data=sashelp.class template=standard;
run;
It will not output the graph because it says I am missing arguments in the log. Could someone please help p me out?
I assume you are asking for two different best-fit lines, one for transition and age, and one for transition and BMI.
It's not clear to me why you are doing this in PROC TEMPLATE rather than PROC SGPLOT. In PROC SGPLOT, you would use two SCATTER statements and two REG statements.
I assume you are asking for two different best-fit lines, one for transition and age, and one for transition and BMI.
It's not clear to me why you are doing this in PROC TEMPLATE rather than PROC SGPLOT. In PROC SGPLOT, you would use two SCATTER statements and two REG statements.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.