For \(1 \leq h \leq 3\) categories of animals, \[ Y^h = [Y^h_{ij}]_{1 \leq i \leq n, 1 \leq j \leq p^h} \] \[ Y^h_{ij} = \mathbb{I}\left\{\begin{array}{c} \text{an interaction between plant species $i$ and} \\ \text{animal species $j$ from category $h$ has been observed} \end{array} \right\} \]
\[\begin{align} (Z_i)_{1 \leq i \leq n} & \text{ iid}: & Z_i & \sim \mathcal{M}_K(1, \pi) \nonumber \\ \text{for } 1 \leq h \leq H, \quad (W^h_j)_{1 \leq j \leq p^h} & \text{ iid}: & W^h_j & \sim \mathcal{M}_{L_h}(1, \rho^h) \\ (Y^h_{ij})_{1 \leq i \leq n, 1 \leq j \leq p, 1 \leq h \leq H} & \text{ indep.} \mid (Z_i), (W^h_j): & (Y^h_{ij} \mid Z_i=k, W^h_j=\ell) & \sim \mathcal{B}(\gamma^h_{k\ell}) \nonumber \end{align}\]
## Plants Flovis Ants Birds ICL
## [1,] 7 2 2 1 -2961.903
## [2,] 6 2 2 1 -2965.539
## [3,] 5 2 2 1 -2981.164
## [4,] 5 2 1 1 -3017.651
## [5,] 5 1 1 1 -3071.369
## [6,] 4 1 1 1 -3128.286
## [7,] 3 1 1 1 -3216.136
## [8,] 2 1 1 1 -3358.851
## [9,] 1 1 1 1 -3582.348
## [1] "number of groups"
## Plants Flovis Ants Birds
## 7 2 2 1
## [1] "group proportions for plants"
## [1] 0.46752510 0.16063183 0.13507513 0.07840873 0.10614897 0.01418720 0.03802305
## [1] "group proportions for insects"
## [1] 0.06221568 0.93778432
## [1] "plant - insect connectivity matrix"
## [,1] [,2]
## [1,] 9.573240e-02 7.490241e-03
## [2,] 4.173707e-03 8.566580e-08
## [3,] 8.826487e-07 3.317267e-04
## [4,] 1.651832e-01 3.427940e-02
## [5,] 1.917898e-01 6.378749e-02
## [6,] 2.464664e-15 4.440892e-16
## [7,] 1.001131e-15 4.440892e-16