I'm still learning about mixed effects models, so bear with me here. I'm interested in modelling a binary response using a generalized additive mixed effects model with "year" as a covariate and random effect, but I've seen far smarter people than I argue for and against it (a covariate can't be both). For example:
Absolutely. In fact, the vast majority of the time, you absolutely should include a fixed effect. The reason for this is that random effects are restrained to ∑γ=0 , or always centered around 0. Thus, the random effect is the individual's estimated deviation from the group average for that individual. By leaving out the fixed effect, you would imply that the average effect of time must be 0.
I've also heard from colleagues:
"In short, no, a variable can't be both fixed and random. In Frequentist statistics, fixed effects are assumed to represent an actual "true" effect of the variable on the target mean, while random effects are assumed to have an effect on the mean that's randomly drawn from some distribution of possible values."
I'd like to know if there's a way around this problem. Please let me know if I'm misinterpreting these points of view.
My experimental design:
Fish are collected and there stomachs examined to see if they ate something, or not (0/1), at the same 12 sites, every 9 months, every year. Many sites = a zone, and some zones have many more sites than others. My repeated measure is the length of the fish as another covariate.
If I'm interested in differences between years, differences between zones, and their interaction, but I also want to capture similarity between observations taken in the same site, zone, and year, is converting year to a continuous variable in the random effects and a factor in the fixed effects one possible solution? Where every zone has it's own trend through time (s(fZone, CYR, bs='re')) and the fixed effects shows where those differences are (fZone*fCYR)? Or, if it must be one or the other, can fixed effects also capture correlation structures without random effects?
- fCYR = factor calendar year
- fZone = factor zone
- CYR = continuous year