Skip to content
Prev 19593 / 20628 Next

Help with specifying interaction term involving nested factor

Hello all,

I have a doubt regarding how to specify a Poisson model and NBM with nested
effects using glmer, glmer.nb, and glmmTMB functions. I will explain the
factors below:

X - response variable
A - fixed factor
B - random factor; nested within C

I want to check the effect of A, B (nested within C), and the interaction
effect: B (nested within C) * A. I understand that the nested random factor
can be specified as (1 | C/B), but I am not sure how the interaction term
should be specified.

mF <- glmer(X ~ A + (1 | C/B) + (1 | C/B : A), family = "poisson", data = d)

If I run the above formula, the effect of C is computed twice, and I am not
interested in looking at that effect.

Could someone please help me with this? Thank you very much.


Best regards,
Revathe

--
PhD student
Animal Behaviour and Sociogenetics lab
Evolutionary and Organismal Biology Unit
Jawaharlal Nehru Centre for Advanced Scientific Research
Bengaluru
India