# BOTH random AND fixed effects for binary factor in lmer. Pointless?

I once read around here that with binary factors in mixed effects models (lmer specifically), one shouldn't specify both random and fixed effects. The person went on to note that some people wouldn't combine fixed and random even for three- and four-level factors. Unfortunately, I can't recall if the person referred to random intercepts and/or random slopes in particular--what's certain is this relates to the very concept of random effects.

Does it ring true? Please take this question as from a beginner. It might as well be that obviously having both random and fixed effects doesn't make sense for a binary factor because there's nothing to control there... So, I have tried setting random intercepts and a fixed effect for a binary factor, and indeed, the model doesn't converge--yet that's little testing.

Sincerely thank you for any tips

• What exactly do you mean by including both random and fixed effects? Can you provide an example? Are you talking about lmer(y ~ factor + (1|factor), data)? This does not make sense whatever the number of levels. – amoeba Oct 14 '16 at 10:10
• Right. I mean something that would make sense, so a full model that includes other random and fixed effects. Meanwhile, I have received a reply elsewhere that says the claim in question wouldn't be right, whatever the levels of the factor. So, both random and fixed could normally make sense, even for a binary factor. Would you think the same? – Pablo Bernabeu Oct 14 '16 at 13:19
• I am not sure I understand your situation so I still suggest you provide a more explicit example. E.g. lmer(y ~ x + factor + (1|factor), data) would not make sense either. – amoeba Oct 14 '16 at 13:36
• One example would be lmer(y ~ (1 | participant) + (1|factorA) + (1|participant:factorA) + (1| factorB) + (1| factorB : participant) + (1| factorC) + (1| factorC : participant) + factorD + factorD : factorC + factorE, data) where I've entering each effect as parsimoniously as possible. FactorE is the critical, binary one. Theoretically (convergence and significance aside), could it have random intercepts? I'm starting to think it perfectly could, based on the feedback I've been getting (I might have misunderstood the original comment I'm referring to :-/). Thank you so much. – Pablo Bernabeu Oct 14 '16 at 16:40
• Still not sure what you mean, but I don't think it ever makes sense to have + factorE and + (1 | factorE) in the same model. Is that what you were considering? Doesn't matter how many levels this factor has. – amoeba Oct 14 '16 at 23:03

• I don't think it ever makes sense to have + factorE and + (1 | factorE) in the same model. Doesn't matter how many levels this factor has. – amoeba Oct 14 '16 at 23:04