- Operating System: MacOS
- brms Version: 2.13.0

Is it possible to fit a social relations model (SRM) in **brms**? Say I have dyadic data where y_{ij} is the total number of gifts the i\text{th} household gives to the j\text{th} household over time. The model is

where \beta_0 is the log of the average number of gifts across dyads, g_i is the deviation for i\text{th} household to give across dyads, r_j is the deviation for j\text{th} household to receive across dyads, and d_{ij} is the dyadic-specific deviation. The data are balanced such that there are counts for all possible pairs of households in the data.

The data and model proximally come from Section 14.4 from McElreath’s 2nd edition of *Statistical Rethinking*. They originally come from the freely available paper by Koster and Leckie (2014, see page 102).