SAS 麪條圖

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).

[caption id="attachment_2764" align="alignnone" width="550"]

Couleur / Pixabay[/caption]

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!🍜

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章