Hello SAS experts,
I'd like to create a Desired Plot on the right in the image?
Any comments or demo codes highly appreciated.
Acknowledgement: The code here was suggested by DanH_sas.
proc import datafile="...\plot.txt"
out=plot
dbms=tab replace;
guessingrows=max;
run;
proc sgplot data=PLOT /*data attached*/;
series x=risk_out y=mean_bias / group=agecat;
series x=risk_in y=mean_bias / group=agecat x2axis transparency=1;
run;
To get that graph, you will also need a REVERSE:
proc import datafile="...\plot.txt"
out=plot
dbms=tab replace;
guessingrows=max;
run;
proc sgplot data=PLOT /*data attached*/;
series x=risk_out y=mean_bias / group=agecat;
series x=risk_in y=mean_bias / group=agecat x2axis transparency=1;
x2axis reverse;
run;
Hope this helps!
Dan
To get that graph, you will also need a REVERSE:
proc import datafile="...\plot.txt"
out=plot
dbms=tab replace;
guessingrows=max;
run;
proc sgplot data=PLOT /*data attached*/;
series x=risk_out y=mean_bias / group=agecat;
series x=risk_in y=mean_bias / group=agecat x2axis transparency=1;
x2axis reverse;
run;
Hope this helps!
Dan
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.