BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
emaneman
Pyrite | Level 9

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)

Screenshot 2024-08-26 at 19.14.27.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
jiltao
SAS Super FREQ

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

View solution in original post

7 REPLIES 7
ballardw
Super User

And the question is???

 

<asked when the question message window was blank>

emaneman
Pyrite | Level 9

hello @ballardw 

sorry, I posted by mistake before writing the question!
Now it should appear.
E
jiltao
SAS Super FREQ

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

emaneman
Pyrite | Level 9

 

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.

 

 

jiltao
SAS Super FREQ

You might want to use --

estimate 'xxx' spl[1, 1.56][-1, -1.56];

Thanks,

Jill

emaneman
Pyrite | Level 9

yes, this works. Thank you again.

emaneman
Pyrite | Level 9
i am no longer able to accept this as the solution, but of course you did provide an answer to all of my queries.
E

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is ANOVA?

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.

Discussion stats
  • 7 replies
  • 675 views
  • 2 likes
  • 3 in conversation