A recent question on SAS graphics communities page discussed the topic of ways to visualize the change from baseline for subjects in a study. The sample graph posted by user was a 3D ribbon plot shown below.
There are multiple limitations of the 3D depiction of the data in the above graph. It is not easy to compare the response of different subjects even though the data is likely sorted by the largest reduction in size. Also, the graph area is not used efficiently.
This data can be effectively visualized in a 2D visual called the “Spider Plot”. This is a good way of presenting the history of the Change from Baseline for tumors for subjects in a study by week. The plot can be classified by response and stage.
This graph displays the change from baseline for all subjects in a study. Each curve represents one subject, and could be labeled with subject id if appropriate. The curve is colored to indicate response type and also labeled by stage. In this example, I have labeled each curve directly, instead of using a symbol and a legend. Whenever possible, direct labeling is easier to decode.
proc sgplot data=spider noborder;
format tgroup $growth.;
styleattrs datacontrastcolors=(green gold red) axisextent=data;
refline 0 / lineattrs=(pattern=shortdash);
series x=week y=change / group=subject grouplc=rgroup
groupmc=rgroup markers markerattrs=(symbol=circlefilled)
lineattrs=(thickness=2 pattern=solid) name=’a’;
text x=weekS y=change text=tgroup / position=right;
keylegend ‘a’ / title=’Response’ type=linecolor valueattrs=(size=7)
location=inside position=topright across=1 opaque;
keylegend ‘b’ / valueattrs=(size=7) noborder;
xaxis label=’Week’ offsetmax=0.2 grid;
yaxis values=(-80 to 80 by 20) grid display=(noline noticks);
I will add the full SAS program file once I figure out the allowed formats. In this version of WordPress, text files or zip files are not allowed.