Data

\(n = 34\) members of a karate club.

Response variable : \[ Y_{ij} = \left\{ \begin{array}{ll} 1 & \text{if have common social activities (except karate),} \\ 0 & \text{otherwise.} \end{array}\right. \]

Stochastic block model

Model with \(K\) groups: \[\begin{align*} (Z_i)_{1 \leq i \leq n} & \text{ iid}: & Z_i & \sim \mathcal{M}_ K(1, \pi) \\ (Y_{ij})_{1 \leq i < j \leq n} & \text{ indep.} \mid (Z_i): & (Y_{ij} \mid Z_i=k, Z_j=\ell) & \sim \mathcal{B}(\gamma_{k\ell}) \nonumber \end{align*}\]

\(K = 4\) groups
## pi =
## [1] 0.061 0.375 0.090 0.474
## gamma =
##       [,1]  [,2]  [,3]  [,4]
## [1,] 0.905 0.075 0.183 0.715
## [2,] 0.075 0.119 0.520 0.001
## [3,] 0.183 0.520 0.941 0.153
## [4,] 0.715 0.001 0.153 0.081