BookmarkSubscribeRSS Feed
Dimi
Calcite | Level 5

Hi Everyone, 

Thanks for taking the time to read this. 

I'm having a bit of trouble with PROC MIXED -namely when modeling an interaction term between a continuous and binary variable. 

The model part of my code reads like this: 

 

model result = arm_studyall*visit_m arm_studyall visit_m /solution;

 For clarity result is a continuous variable. arm_studyall is a binary variable and visit_m is a continuous variable.

When I execute my code the fixed part of the model produces an interaction term for both levels of the binary variable

Capture.PNG

I'm not quite sure why this is happening -as I would expect only one interaction term to be estimated. 

Any insight would be helpful. 

Thanks again. 

 

2 REPLIES 2
PaigeMiller
Diamond | Level 26

You get an effect (slope) of visit_m when arm_studyall is zero.

 

You also get an effect (slope) of visit_m when arm_studyall is one.

 

This is the exact meaning of an interaction between continuous and binary variable ... there are really two different slopes.

--
Paige Miller
FreelanceReinh
Jade | Level 19

Hi @Dimi,

 

If you want only one of the interaction terms to have a nonzero estimate, just reorder the effects in your model statement, so that main effects are prioritized:

model result = arm_studyall visit_m arm_studyall*visit_m /solution;

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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