hello all,
I would appreciate some help with the syntax for ESTIMATE in the following model:
proc glimmix data=srst2 ;
class id IV;
effect spl= spline(progress / degree=2 basis=bspline details knotmethod=percentiles(2));
model DV = IV spl IV*spl / noint s;
random int / subject=id;
store dv;
proc plm source=dv;
effectplot slicefit(x=progress sliceby=IV);
run;
This model results in a significant main effect of spl, but no significant main effect of IV or interaction effect. See the plot below.
I would like to, nevertheless to test (using ESTIMATE):
1. The overall linear effect of spl (which is akin to the main effect that I test in the model)
2. The main effect of spl, separately for the two levels of IV (-1 and 1)
3. The effect of spl between -1.5 and 0, separately for the two levels of IV (-1 and 1)
4. The effect of spl between 0 and 1.5, separately for the two levels of IV (-1 and 1)
(*note that my model has both main effects and the interaction)
I am not sure what you mean by "overall LINER effect of spl". If you are referring to the test for the SPL effect, then you can examine the Type 3 Tests for Fixed Effects table to see it. It might show a 4df test. So it is not that straightforward to use the ESTIMATE statement to reproduce the test. But if you wish to do so, you can add the E3 option in the MODEL statement in PROC GLIMMIX, and see exactly how the test was performed, then use the ESTIMATE statement to reproduce the test based on the E3 option output.
You would follow the same approach for the second test you requested. Again, it would be a multiple-degree-of-freedom test.
For the third and fourth tests, if I can rephrase your "spl effect" to "the difference in the mean response", then the following ESTIMATE statements might work for your third tests --
estimate 'difference between -1.5 and 0 for IV=-1' spl[1, 0][-1, -1.5] IV*spl[1, 1 0][-1, 1 -1.5 ];
estimate 'differnece between -1.5 and 0 for IV=1' spl[1, 0][-1, -1.5] IV*spl[1, 2 0][-1, 2 -1.5];
You can write the similar ESTIMATE statements for your fourth test.
I hope this helps,
Jill
And the question is???
<asked when the question message window was blank>
I am not sure what you mean by "overall LINER effect of spl". If you are referring to the test for the SPL effect, then you can examine the Type 3 Tests for Fixed Effects table to see it. It might show a 4df test. So it is not that straightforward to use the ESTIMATE statement to reproduce the test. But if you wish to do so, you can add the E3 option in the MODEL statement in PROC GLIMMIX, and see exactly how the test was performed, then use the ESTIMATE statement to reproduce the test based on the E3 option output.
You would follow the same approach for the second test you requested. Again, it would be a multiple-degree-of-freedom test.
For the third and fourth tests, if I can rephrase your "spl effect" to "the difference in the mean response", then the following ESTIMATE statements might work for your third tests --
estimate 'difference between -1.5 and 0 for IV=-1' spl[1, 0][-1, -1.5] IV*spl[1, 1 0][-1, 1 -1.5 ];
estimate 'differnece between -1.5 and 0 for IV=1' spl[1, 0][-1, -1.5] IV*spl[1, 2 0][-1, 2 -1.5];
You can write the similar ESTIMATE statements for your fourth test.
I hope this helps,
Jill
Thank you very much for your response.
I was able to implement 3 and 4 with the syntax you suggested.
For the two others, 1 and 2, what I meant is to obtain an estimate value for the main effect of SPL, both overall, and separate for the two levels of IV.
To obtain the main effect separately for the two levels of IV, starting from your suggestion, since the continuous variable PROGRESS range is -1.56 to 1.56, I did the following:
estimate 'difference between -1.56 and 1.56 for IV=-1' spl[1, 1.56][-1, -1.56] IV*spl[1, 1 1.56][-1, 1 -1.56];
estimate 'differnece between -1.56 and 1.56 for IV=1' spl[1, 1.56][-1, -1.56] IV*spl[1, 2 1.56][-1, 2 -1.56];
Unsurprisingly, given the plot, they are both significant and similar in terms of strength of the effect.
To obtain the main effect irrespective of the two levels of IV, I tried the following:
estimate 'xxx' spl[2, 1.56][-2, -1.56] IV*spl[1, 1 1.56][-1, 1 -1.56] [1, 2 1.56][-1, 2 -1.56];
The result makes sense, given the slope, but I am not sure it is the correct estimate.
You might want to use --
estimate 'xxx' spl[1, 1.56][-1, -1.56];
Thanks,
Jill
yes, this works. Thank you again.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.