Random effects and fixed effects in GLMM I have the following model written. I have chosen for field as a random factor. I understood that an interaction between a fixed and random will be written as a fixed effect. As a result, I have the following model:
myGLMM4R <- glmmTMB(spp.richness ~ treatment + moment_datacollection + treatment * moment_datacollection +
                      (1|field) + field*treatment + field * moment_datacollection  ,
                   data = metaspecies, na.action = na.fail)

After model selection (dredge) the following model is selected: Model: spp.richness ~ field + moment_datacollection + treatment + (1 | field) + field:moment_datacollection
I was wondering why field is included in this model both as fixed and random. Is that because the interaction includes field and is a fixed effect? Is it a problem that field is now twice in the model? I included field as a random effect, to lower the df. But now it is included also as a fixed effect so will increase the df. Is there a way to solve this?
Thanks!

With field being a factor, you consider a formula right-hand side of the form:
... + field + (1 | field) + ...

That means you model the interaction of intercept and field as both a fixed and a random effect, which leads to redundancy. You could e.g. set the fixed effects to the optimal value and the random effect for all levels to zero.
The lme4 package renders a warning that "parameters are not uniquely determined". glmmTMB, on the other hand, doesn't complain, at least not in my experiment, but it sets all the random effects to (almost) zero.
So, my recommendation is to choose only one of those two terms.
