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 " ";
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.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.