BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.

 A SAS user on reddit asks this question.  No responses there so far, but I'll bet someone here can comment with a clever explanation.  We can close the loop when we have an answer.

 

Hi there,

as far as I know SAS does not allow for an effect to be fixed if it is nested within an effect set as random. An example model would be

 

y = A + A∙B + e

with A random and A∙B fixed.

 

Can anyone confirm this for me or is there a way to work around it? I'm fine with it not being possible, I just wanted to check if I missed something. I'd like to write in my article that it is not possible.

Thanks

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
1 ACCEPTED SOLUTION

Accepted Solutions
lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

You are right. If one effect is random, then it's interaction must be random. The opposite is not true: A and B can both be fixed effects, but A*B can be random. The latter happens a lot, and it a common situation with multi-treatment meta-analysis.

 

You can force MIXED to do what you want by creating other variables in a DATA step (AA=A; BB=B), and then define some of these as random in in MIXED. I don't recommend this: you could get strange or meaningless results.

View solution in original post

3 REPLIES 3
lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

You are right. If one effect is random, then it's interaction must be random. The opposite is not true: A and B can both be fixed effects, but A*B can be random. The latter happens a lot, and it a common situation with multi-treatment meta-analysis.

 

You can force MIXED to do what you want by creating other variables in a DATA step (AA=A; BB=B), and then define some of these as random in in MIXED. I don't recommend this: you could get strange or meaningless results.

Rick_SAS
SAS Super FREQ

But @lvm, isn't it misleading to say "SAS does not allow for an effect to be fixed if it is nested within an effect set as random"?

 

Is it "SAS" that prevents it, or is it the theory of mixed models that prevents it, and SAS merely adheres to the theory?

lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

Rick, I agree that SAS does not allow it for a reason: statistical theory. My latter suggestion was just to see what happens. It is not a limitation of MIXED: one should consider interactions as random when any of the component main effects are random.

 

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 3 replies
  • 1602 views
  • 9 likes
  • 3 in conversation