I have an augmented capture-history matrix `y_{it}` for `M` candidate species observed over `T` grab occasions. I want a closed-population capture-recapture model with time-varying mean detection, individual heterogeneity, and a behavioral effect of capture on the next occasion.

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

Here:
`y_{it}` is the observed grab-detection indicator for species i at occasion t,
`z_i` is the latent inclusion indicator for augmented species i,
`omega` is the inclusion probability,
`mean_p_t` is the baseline detection probability on occasion t,
`eps_i` is the species-specific logit-scale detection effect,
`sigma` is the standard deviation of the species-specific effects,
`gamma` is the behavioral recapture effect on the logit scale,
`p_{it}` is the detection probability for species i at occasion t,
`M` is the number of augmented species,
`T` is the number of grab occasions.
