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.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.