# Random effects in GLMM [closed]

I am running at the moment a GLMM with insect abundance (count data) as response variable and 3 landscape variables and temperature as (continous) explanatory variables. So, my GLMM looks like this:

insect abundance ~ v1 + v2 + v3 + temp + (1 | site)

In total, I measured insect abundance on two evenings at 60 sites and I wanted to include site as a random effect.

However, now I am a bit confused as to whether this is possible given that while insect abundance and temperature differ between these two sampling dates, landscape variables stay the same (as they did not change btw my two sampling dates of course). Hence, I have two different values for insect abundance and temperature per site, but only one value for the landscape variables.

My question is now: Can I still use 'site' as a random effect here, i.e. is this a GLMM or rather a GLM (without a random effect)?

I hope my question makes sense.

Thanks a lot!

## closed as unclear what you're asking by Michael R. Chernick, Peter Flom - Reinstate Monica♦Oct 12 at 12:17

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• This seems like the reason why you do need to use a multlievel model - that is, site is repeated. Thus the assumption of independent errors is violated and you shouldn't do a GLM. – Peter Flom - Reinstate Monica Oct 12 at 12:17
• Thank you, Peter. – Tanja Oct 13 at 7:01

Yes, you can use site as a random effect. The observations are not independent so you need to account for the site effect somehow. Whilst the landscape variables you mention might explain differences in the mean insect abundance between your 60 sites, they are unlikely to account for all the difference (and likely can't as you point out that the counts differ on each evening despite the landscape effect being fixed).
So, your landscape fixed effects may explain some of the variation between sites, but not all. But you also need to inform the model that you sampled the same locations twice not only to account for the site effect not explained by the landscape variables, but also because you measured the same unit/subject twice. It is likely that any single site is more similar to itself than a pair of sites with the same (or very similar) landscape characteristics. Including the random effect induces a correlation between observations from the same site whilst we assume observations between sites are uncorrelated.
Including the random effect therefore includes something in the model that reflects the repeated observations on the same subjects (sites), which you would be ignoring if you removed the random effect for site and went with a simple GLM.