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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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
  • 1259 views
  • 1 like
  • 2 in conversation