I have an augmented capture-history matrix `y_{it}` for `M` candidate animals observed over `T` sampling occasions. I want a closed-population capture-recapture model with time-varying mean detection probabilities and individual heterogeneity in detectability.

My model is:
`z_i ~ Bernoulli(omega), for i = 1, ..., M,`
`eps_i ~ Normal(0, sigma), for i = 1, ..., M,`
`logit(p_{it}) = logit(mean_p_t) + eps_i, for i = 1, ..., M and t = 1, ..., T,`
`y_{it} | z_i ~ Bernoulli(z_i p_{it}), for i = 1, ..., M and t = 1, ..., T.`

Here:
`y_{it}` is the observed capture indicator for individual i at occasion t,
`z_i` is the latent inclusion indicator for augmented individual i,
`omega` is the inclusion probability,
`mean_p_t` is the mean detection probability on occasion t before adding individual heterogeneity,
`eps_i` is the individual-specific logit-scale detection effect,
`sigma` is the standard deviation of the individual heterogeneity effects,
`p_{it}` is the detection probability for individual i at occasion t,
`M` is the size of the augmented data set,
`T` is the number of sampling occasions.
