[R-sig-ME] Help with specifying interaction term involving nested factor

Revathe Thillaikumar rev@theth|||@|kum@r @end|ng |rom gm@||@com
Fri Nov 19 05:22:54 CET 2021


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

	[[alternative HTML version deleted]]



More information about the R-sig-mixed-models mailing list