Solution (source code)

= Solution

Index independent experimental vials by $r$, write $N_r$ for the observed total eaten and $E_r$ for the number of other-species eggs eaten. The <grouped-binomial logistic regression> uses
$$
E_r\mid N_r\sim\operatorname{Bin}(N_r,p_r),\qquad
\operatorname{logit}(p_r)=\log\frac{p_r}{1-p_r}=\beta_0+d_{D_r}+s_{S_r},
\qquad d_1=0,\quad s_A=0.
$$
Here $D_r\in\{1,2,3\}$ and $S_r\in\{A,B,C\}$ identify day and adult species, and the free effects are $\beta_0,d_2,d_3,s_B,s_C$. There is no day-species interaction. The weights in the binomial <generalized linear model> are the denominators $N_r$, so fitting the proportions $E_r/N_r$ gives this <binomial likelihood>, not 23 Bernoulli observations. The dispersion is fixed at one. This is a model for the composition of eggs eaten conditional on the total, rather than a model for the total appetite.