1
$\begingroup$

There are quite a lot of questions which touch on this issue, but there does not seem to be any that sets out any general principles for deciding when it would be a good idea (or a bad idea, or a pointless but non-harmful idea) to model a variable as both random and fixed.

There is a question which presently has a similar title, but which on further inspection is mostly focusing on one specific situation. There's another question which talks about the case of a binary variable, and in which the general impression from the comments seems to be that modelling the variable as random and fixed is always pointless.

$\endgroup$
2
  • 1
    $\begingroup$ (+1) This is an interesting question, it comes up occasionally and is almost always very tricky.The only times I can see that it makes sense is when the factor is treated as a fixed effect and then also interacted with a random effect in the random structure. So the simplest situation would be y ~ fixed.factor + (1|fixed.factor:random.factor). I don't think it ever makes sense to have y ~ fixed.factor + (1|fixed.factor) + (1|random.factor)and now I am trying to think of general sitatuation / general principles ! In the linked question which cites the Barr paper, I don't think it arises. $\endgroup$ Jul 8 '20 at 5:25
  • 1
    $\begingroup$ For the avoidance of doubt, this is about the situation where a fixed effect factor also appears as a grouping variable in the random structure (ie random intercepts) - not random slopes - right ? ? $\endgroup$ Jul 8 '20 at 5:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.