BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
stancemcgraw
Obsidian | Level 7

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?

 

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

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.

--
Paige Miller

View solution in original post

1 REPLY 1
PaigeMiller
Diamond | Level 26

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.

--
Paige Miller

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 1 reply
  • 332 views
  • 0 likes
  • 2 in conversation