SAS Noodle Plot

SAS day 46:

Noodle plots are line plots that may involve many overlapping lines. The line plot enables us to track the lab result for 1 patient over time, noodle plot shows the lab results for serval patients including the Median (Red Line).

Couleur / Pixabay

Sample Noodle Plot Output:

 

Sample Noodle Plot Code:

proc sgplot data=lb5 noautolegend;
styleattrs datacolors=(black) datacontrastcolors=(black);

series x=ady y=median /lineattrs=(pattern=1 thickness=3 color=red)
datalabelattrs=(size=25 weight=bold ) name="resp";

scatter x=ady y=pchg /group=subjid
markerattrs=(symbol=circlefilled size=5 color=black) transparency=0.1;

series x=ady y=pchg/lineattrs=(pattern=1 thickness=1 color=black)
datalabelattrs=(size=2 weight=bold color=black) name="resp"
group=subjid grouplc=subjid;

refline 0;
yaxis label="% Change of from baseline" values=(-40 to 10 by 10);
xaxis label="Day" values=(1,10,20);
run;

Summary:

Noodle plot generally shows the major trends over time for an abundant amount of observations (n>30), however, it could be difficult to distinguish individual curves. We can use some modifications such as separate panels to handle the overplotting

 

Happy SAS Coding and Noodle eating!🍜

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Social media & sharing icons powered by UltimatelySocial
%d bloggers like this: