I have binary avoidance responses `y_{jt}` for dog `j` on trial `t`, with `j = 1, ..., J` and `t = 1, ..., T`. The avoidance probability depends on cumulative previous shocks and previous avoidances, with dog-specific parameters drawn from a bivariate logistic-normal distribution.

My model is:
Let `S_{jt}` be the cumulative number of previous shocks for dog `j` before trial `t`, and let `A_{jt}` be the cumulative number of previous avoidances before trial `t`.

For each dog `j`,

`(logit(a_j), logit(b_j))^T ~ MultiNormal(mu_logit_ab, Sigma_logit_ab),`

where `Sigma_logit_ab` is built from marginal scales `sigma_logit_ab` and correlation matrix `Omega_logit_ab`.

Then

`p_{jt} = a_j^{S_{jt}} b_j^{A_{jt}},`
`y_{jt} ~ Bernoulli(p_{jt}), for j = 1, ..., J and t = 1, ..., T.`

The hyperpriors are

`mu_logit_ab,r ~ Logistic(0, 1), for r = 1, 2,`
`sigma_logit_ab,r ~ half-Normal(0, 1), for r = 1, 2,`
`Omega_logit_ab ~ LKJ(2).`

Here:
`y_{jt}` is the observed avoidance indicator for dog j on trial t,
`S_{jt}` is the cumulative number of previous shocks,
`A_{jt}` is the cumulative number of previous avoidances,
`a_j` and `b_j` are the dog-specific parameters controlling the effect of shocks and avoidances,
`mu_logit_ab` is the population mean vector on the logit scale,
`Sigma_logit_ab` is the population covariance matrix on the logit scale,
`Omega_logit_ab` is the corresponding correlation matrix,
`sigma_logit_ab` is the vector of marginal standard deviations,
`J` is the number of dogs,
`T` is the number of trials per dog.

Parameterization notes:
In `Normal(mu, sigma)`, `sigma` is a standard deviation.
`logit(p) = log(p / (1 - p))`.
