I have constructed a plot of an interaction term with 5 "levels" using the predicted means and upper/lower values using the OUTPREDM option in my model statement from my proc mixed model. I set my alpha to 0.05 (i.e., the default in Proc Mixed) and used the default upper, pred, and lower variables in my output dataset. I am using version 9.4 m7 on the windowing environment.
My figure is nearly how I want it to look; however, I am confused why there are 2 sets of confidence outlines per each mean. If you look closely, you can see that there are two orange-yellow bands below the 0 line and there are two bands of the same classification above the 0 mean line. I am not sure how there are two lines for the lower confidence bands? I checked the raw values at each time point and level of the term, and there are only 5 unique upper and lower values, so I'm perplexed. Is there a way to make it be a single upper bound and a single lower bound per level of the interaction? Thank you!
I have provided both the with outlines and without ("nooutlines") figures for comparison.
proc sgplot data=model noautolegend dattrmap=attrmap1; band x=time upper=upper lower=lower / group=group transparency=0.75 attrid=map1 outline; series x=time y=pred / name="Visit" group=group lineattrs=(thickness=3) curvelabel attrid=map1; yaxis values=(0.2 0 -0.2 -0.4 -0.6 -0.8 -1 -1.2 -1.4) label="Predicted Y"; keylegend "Visit"; run;
You may want to mark your post with the reran and no error as a "solved" so others don't look in here to see what may be going on.
Without knowing your entire SAS session history, environment, ODS destination and options this sort of intermittent behavior is not amenable to much fixing. If you see this again see if you can duplicate the result with a new session. If you can then it would be a good idea to contact tech support as a repeatable issue like this would be their responsibility.
The only suggestion I can make is to look very closely at your data set used for plotting, especially the values of Upper and Lower at the Time values where the gap between the duplicate confidence limits appear greatest within each group.
You may want to mark your post with the reran and no error as a "solved" so others don't look in here to see what may be going on.
Without knowing your entire SAS session history, environment, ODS destination and options this sort of intermittent behavior is not amenable to much fixing. If you see this again see if you can duplicate the result with a new session. If you can then it would be a good idea to contact tech support as a repeatable issue like this would be their responsibility.
Re-ran in a new session and the error did not persist. If this issues arises again and I can replicate it, I will follow ballardw's suggestion.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.