BookmarkSubscribeRSS Feed
bchronister
Fluorite | Level 6

Hello, 

 

I am using sgplot to create a loess graph of grouped data. I have created an indicator variable that determines whether the association is above or below a pvalue of 0.05. I saw that there is a way to create a thickness response when making a series plot. However, I haven't gotten it to work when I am using a LOESS graph. Is there any way to do that? I have copied one of my attempts below. 

 

proc sgplot data=compiled aspect=1 ;
where &rank. & &hormone.;
loess y=lsmean x=LSMeanNumber/group=metabolite markerattrs=(size=0) lineattrs=( thickresp= thickmax=7px)
;
xaxis grid label="Rank" LABELATTRS=(family='Times New Roman' size=10) LABELATTRS=(family='Times New Roman' size=12) valueattrs=(family='Times New Roman' size=12pt); 
YAXIS grid label="ln(hormone) concentration" LABELATTRS=(family='Times New Roman' size=10)  LABELATTRS=(family='Times New Roman' size=12 ) valueattrs=( family='Times New Roman' size=12pt) min=3.5 max=4.5;
format metabolite summaryscore. hormone hormoneln.;
styleattrs datacontrastcolors=(BIGB  VIPB  DELG VIRO STPPK VIYPK );

title " ";
run;
1 REPLY 1
Jay54
Meteorite | Level 14

You may be able to save the data output of the LOESS function from your code to an ODS output data set, and then use it for a SERIES plot with the THICKRESP=numeric-variable option to set line thickness by the p-value variable column.  See other related options in doc to customize the output.

 

https://documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.5&docsetId=grstatproc&docsetTarget=n...

 

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1052 views
  • 1 like
  • 2 in conversation