\begin{equation}
\begin{split}
        U_i &\sim \mathrm{Bernoulli}(\omega)\\
        \mu_i^{z} \sim \mathrm{Beta}(2, 2)  \, \, \, \, \, \quad \quad q^{z}_i &= \mathrm{Bernoulli}(\mu_i^{z})\\
        Z_{ij} &\sim q^{z}_i(z)\\
        \epsilon_i^{a \mid z}(z) \sim \mathrm{Beta}(2 - 1.8 u_i, 0.2 + & 1.8 u_i) \\q^{a | z}_i(\cdot \mid z) &= \mathrm{Bernoulli}\Big(\mu^{a \mid z}(z) = 0.8 z + 0.2 \, \epsilon_i^{a |z }(z)\Big) \text{ for } z \in \{0, 1\}\\
        A_{ij} &\sim q^{a |z }_i(a \mid z_{ij}) \\
        Y_i &\sim \mathrm{Bernoulli}\Big(0.45 - 0.4\, u_i + 0.5\frac{1}{m}\sum_{j=1}^m a_{ij} \Big),
\end{split}
\end{equation}
