With Poisson and binomial models that include
dispersion terms (which is the default), there are
two options for constructing replicate data.
When condition_on is "fitted",
the replicate data is created by (i) drawing values
from the posterior distribution for rates or probabilities
(the \(\gamma_i\) defined in mod_pois()
and mod_binom()), and (ii) conditional on these
rates or probabilities, drawing values for the
outcome variable.
When condition_on is "expected",
the replicate data is created by (i) drawing
values from hyper-parameters governing
the rates or probabilities
(the \(\mu_i\) and \(\xi\) defined
in mod_pois() and mod_binom()),
then (ii) conditional on these hyper-parameters,
drawing values for the rates or probabilities,
and finally (iii) conditional on these
rates or probabilities, drawing values for the
outcome variable.
The default for condition_on is "expected".
The "expected" option
provides a more severe test for
a model than the "fitted" option,
since "fitted" values are weighted averages
of the "expected" values and the original
data.
As described in mod_norm(), normal models
have a different structure from Poisson
and binomial models, and the distinction between
"fitted" and "expected" does not apply.