I'm analyzing an experiment where the strength of the treatment varied by treatment day in an uncontrolled way. Specifically, we tested the response time of 11 non-overlapping groups honey bees on 4+ days, each. On any given day, only one group was tested under two experimental conditions: first unfed, then fed. How much a group of bees fed was out of our hands and varied considerably, hence the variable treatment strength.
My lmer() model currently implicitly includes treatment strength via the random effect (1 | group_id/day):
response_time ~ experimental_condition +
(1 | group_id/subject_id) + (1 | group_id/day)
I'm interested in estimating the effect of experimental_condition on response_time and am wondering whether this model could be improved by incorporating how much a group fed per day? If so, how would I do that, and how can I handle the small number of days on which we were unable to measure how much the bees had consumed?
(1 | group_id/day)". Isdayreally nested withingroup_id? – Robert Long Nov 22 '23 at 13:38daywithingroup_idbecause the weather (temperature, wind speed, cloud cover, ...) has a strong effect on bee behavior, and we tested only one group (bee colony) per day. In addition, each colony began to feed itself on a different day of the experiment, and the amount of food they collected per day increased in colony-specific ways withday. The latter is also why I said that the random effect(1 | group_id/day)currently implicitly includes treatment strength. – Tim Nov 22 '23 at 14:19dayvariable. If it's nested in group that means eachday"belongs" to 1 and only 1 group, and there are multiple days "belonging" to each group. Were no other groups tested on the same day ? If they were then they should be crossed, not nested random effects. See here for details of crossed vs nested, random effects.: Crossed vs nested random effects. Also, it looks like you have duplicated random intercepts for group. – Robert Long Nov 22 '23 at 21:33