Independence log-linear model for a two-way contingency table (source code)

= Independence log-linear model for a two-way contingency table

For cell counts $Y_{ij}$ in a two-way <contingency table>, the independence model is
$$
Y_{ij}\sim\operatorname{Pois}(\mu_{ij}),
\qquad
\log\mu_{ij}=\lambda+\lambda_i^{(1)}+\lambda_j^{(2)}.
$$
The absence of an interaction makes $\mu_{ij}$ factor as a row effect times a column effect. Its <maximum-likelihood fitted values> are
$$
\widehat\mu_{ij}=\frac{y_{i+}y_{+j}}{y_{++}}.
$$