posterior_predict,ubmsFit-method {ubms} | R Documentation |
Draw from the posterior predictive distribution
Description
Draw from the posterior predictive distribution after fitting a model.
You can draw from the posterior of the observed outcome y
or
the latent unobserved state z
.
Usage
## S4 method for signature 'ubmsFit'
posterior_predict(
object,
param = c("y", "z"),
draws = NULL,
re.form = NULL,
...
)
Arguments
object |
A fitted model of class |
param |
Either |
draws |
An integer indicating the number of draws to return. The default and maximum number of draws is the size of the posterior sample. |
re.form |
If |
... |
Currently ignored |
Value
A matrix of simulations from the posterior predictive distribution.
If param = "z"
, the dimensions are draws
by number of sites
(or sites x primary periods in site-major order for dynamic models). If
param = "y"
, the dimensions are draws
by sites x observations
(or sites x primary periods x observations for dynamic models).