I am running a model predicting depression (DASSDep) from the interaction of resilience (ResilTot) and time (time_rev) controlling for diagnostic group (DxGroup). I am treating time as continuous and it is measured over four time points, and resilience is also measured continuously. Even though my omnibus interaction is significant, the conditional effects I produced are not. Can someone please provide feedback on if I am producing the conditional effects correctly? And if I am, why might the conditional effects be non-significant and are there any follow-up tests I could conduct? Code is below:
proc mixed data=amy.noanx;
class PID DxGroup;
model DASSDep = DxGroup ResilTot|time_rev /solution;
store DepRes;
random int/subject=PID;
run;
proc plm restore=DepRes;
estimate 'low resilience' time_rev 1 time_rev*ResilTot 94.50,
'moderate resilience' time_rev 1 time_rev*ResilTot 135,
'high resilience' time_rev 1 time_rev*ResilTot 162.5/e;
run;
I don't believe your ESTIMATE statement is complete as written. There is no value to plug in for the main effect of ResilTot. Please try:
estimate 'low resilience at time 1' time_rev 1 ResilTot 94.50 time_rev*ResilTot 94.50,
'moderate resilience at time 1' time_rev 1 ResilTot 135 time_rev*ResilTot 135,
'high resilience at time 1' time_rev 1 ResilTot 162.5 time_rev*ResilTot 162.5/e;
I think the lack of significance for the conditional comparisons is coming from the fact that they are only being estimated at time_rev=1.
In this design, I would be tempted very strongly to consider time_rev as a categorical variable rather than as a continuous variable. Then you could test whether the slope of adjusting for ResilTot is the same at all time points (See SAS for Mixed Models, in the chapter on analysis of covariance).
SteveDenham
Thank you @SteveDenham . I am trying to produce the effect of time at different different levels of resilience. Is the code you suggested achieving this? Or is it just producing the effect of resilience on depression at time 1? In other forum posts, I understood the "1" after time to represent a one unit increase in time but perhaps I am mistaken. Can you please clarify?
Hi @AmyR , I think you are correct about the 1 (I am too used to treating time as a categorical variable so that I can fit a covariance structure to it), but I believe you still need the ResilTot term in your estimate statement, as the parameter estimate for time*ResilTot is an estimate of the deviation in slope from the ResilTot estimate. And you should have 3 separate estimate statements, because as @jiltao pointed out, your current syntax provides a joint test, rather than individual tests.
This makes sense. Thanks @SteveDenham . To confirm, the three estimate statements would be:
estimate 'low resilience at time 1' time_rev 1 ResilTot 94.50 time_rev*ResilTot 94.50/e;
estimate 'moderate resilience at time 1' time_rev 1 ResilTot 135 time_rev*ResilTot 135/e;
estimate 'high resilience at time 1' time_rev 1 ResilTot 162.5 time_rev*ResilTot 162.5/e;
Is this correct? Thanks again.
@jiltao @SteveDenham Thanks for your continued help with this. I ran three estimate statements as I noted in my previous post:
estimate 'low resilience at time 1' time_rev 1 ResilTot 94.50 time_rev*ResilTot 94.50/e;
estimate 'moderate resilience at time 1' time_rev 1 ResilTot 135 time_rev*ResilTot 135/e;
estimate 'high resilience at time 1' time_rev 1 ResilTot 162.5 time_rev*ResilTot 162.5/e;
I am still getting significant time by resilience interactions but non-significant conditional effects. Do you have any suggestions about how I can correctly derive the conditional effects? Thanks again.
Could you share the results of the solution vector? Now I suspect the estimate statement needs different values, but I really don't know what they should be without digging a little deeper.
SteveDenham
Thanks! Results are included as a PDF.
Your ESTIMATE statement in PROC PLM (if they are estimable) tests if the slopes for time at low, medium and high resilience are jointly zero. This is not testing if the slopes are different among different levels of resilience, which is what the interaction term tests.
As I pointed out previously, your ESTIMATE statements do not test the same thing as your interaction effect. Are you trying to write the ESTIMATE statement to reproduce the interaction effect? What do you mean by "conditional effects"?
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.