SAS Day 43: Spider Plot
🕷 Spider Plot is a powerful graph to visualize the change in percentage for critical values, such as Tumor size, lab values for individual patients over time.
In the graph, each leg of the spider represents an individual patient, the horizontal reference time, Y-axis shows the baseline relative values. It demonstrates the percent change across all desired time range rather than a specified time. However, this method is good for little subjects, if too many subjects it would be too hard to interpret.
[caption id="attachment_2702" align="alignnone" width="500"]adege / Pixabay[/caption]
Example:
We will present the ALT lab value for three patients from day 0 to day 100. In addition, we will try to explore some statistical information from the graph.
Sample Code:
ods output;
proc sgplot data=a /*dattrmap=attrmap*/ noautolegend;
series x=ady y=pchg / lineattrs=(thickness=2)
group=subjid markers markerattrs=(symbol=circlefilled size=7) transparency=0.3 /*attrid=myid*/;
refline 0;
yaxis label="% Change from Baseline" values=(-30 to 420 by 50);
xaxis label="Days from Baseline" values=(0 to 100 by 20);
title "ALT Value change from baseline";
run;
Conclusion:
As we can see, the post-treatment is easily compared, the red patient's ALT level stays the relative stable, whereas the blue patient increased about 400% around 100 days.
The spider plot is good to show the qualitative assessment of individual patient percent level change when the total number of patients is small. These plots are less interpretable if a larger number of patients are displayed because it will be difficult to follow the individual lines. In addition, if a patient is dead early in the trial there will be missing information.
The spider plot is famous for telling a story of what happens to each of these responses over time, while the waterfall plot focuses on the best response measure only.
Happy SAS Coding! 🕷
Reference:
https://www.lexjansen.com/phuse-us/2018/dv/DV08.pdf