Skip to content
Back to formatted view

Raw Message

Message-ID: <CAEktutCGBazB6pnUuF7T2+3acdukzvKYdOCjKeygx1L+MV2w=Q@mail.gmail.com>
Date: 2021-11-19T04:22:54Z
From: Revathe Thillaikumar
Subject: 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

	[[alternative HTML version deleted]]