BookmarkSubscribeRSS Feed
AmyR
Calcite | Level 5

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;

10 REPLIES 10
SteveDenham
Jade | Level 19

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

 

AmyR
Calcite | Level 5

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?

SteveDenham
Jade | Level 19

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.

AmyR
Calcite | Level 5

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.

AmyR
Calcite | Level 5

@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.

SteveDenham
Jade | Level 19

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

AmyR
Calcite | Level 5

Thanks! Results are included as a PDF. 

AmyR
Calcite | Level 5
And full code is below:

libname amy '/folders/myfolders/COVID/Updated_05042021';
proc mixed data=amy.restructured_05042021;
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 ResilTot 105.12 time_rev*ResilTot 105.12/e;
estimate 'moderate resilience' time_rev 1 ResilTot 135.5 time_rev*ResilTot 135.5/e;
estimate 'high resilience' time_rev 1 ResilTot 157.92 time_rev*ResilTot 157.92/e;
run;


Resilience is at 16th, 50th, and 84th percentiles.
jiltao
SAS Super FREQ

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.

jiltao
SAS Super FREQ

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: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 10 replies
  • 1394 views
  • 1 like
  • 3 in conversation