I'm using lmer to test how multiple variables (in this case, treatment, species, and sex) influence avian behaviour.
M1 <- lme4(Behaviour ~ Treatment+Subspecies+Sex + (1|Individual)+(1|Stimulus-ID), data=data)
where behaviour is continuous and Treatment,Subspecies, and sex are all categorical. Individual and Stimulus Ids are set to be as random variables as this was a repeated design (for individual) and I want to reduce pseudoreplication by controlling for my stimuli (e.g., bird song playback) as is often done in behavioural research.
In early efforts, I've found that Treatment and Sex are important in some behavioural context and Subspecies in others (but interactions between these fixed factors are non-significant). However, while in the field, I noted other covariates that appear significant when I run them in the full model. For example, Time of day a behaviour recorded was noted is an important predictor of the overall behaviour.
However, I'm mostly interested in the effect of Treatment, Subspecies, and Sex. I would like to control for this confounding variable (among others), but I'm pretty stumped on the proper way to code for this and I would appreciate any insight one may have. That is to say, I know time of day is important in predicting behaviour, so I want to account for this so that I can fully appreciate the effect Treatment/subspecies/sex has on individual behaviour.
If this is poorly written or needs further clarification, I'm happy to provide any more insight. Thanks in advance for your help and any suggestions you have!