Hi,
I need to plot this comparison graph between 2 variables (see screenshot). Can someone identify the type of plot and a general procedure for this (looks like it's a comparison between 2 variables for 2 studies)? Thank you.
The basic underlying plot appears to be a Scatter plot. Just has multiple Y axis values for the same X axis value.
The grouping of Study1 and Study2 looks like this might be best from SGPANEL with a Panelby variable holding the values in the Study position, and a Scatter with the X variable the "Cue"/"Non-Cue" value and Y variable with the numeric.
A basic example of something similar. Addition options available to control some spacing, grid lines and such.
proc format; value agegroup 11-13='13 or younger' 14-16='14 and older' ; proc sgpanel data=sashelp.class; panelby sex / ; scatter x=age y=height; format age agegroup.; colaxis type=discrete discreteorder=formatted ; run;
The basic underlying plot appears to be a Scatter plot. Just has multiple Y axis values for the same X axis value.
The grouping of Study1 and Study2 looks like this might be best from SGPANEL with a Panelby variable holding the values in the Study position, and a Scatter with the X variable the "Cue"/"Non-Cue" value and Y variable with the numeric.
A basic example of something similar. Addition options available to control some spacing, grid lines and such.
proc format; value agegroup 11-13='13 or younger' 14-16='14 and older' ; proc sgpanel data=sashelp.class; panelby sex / ; scatter x=age y=height; format age agegroup.; colaxis type=discrete discreteorder=formatted ; run;
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.