posterior_predict.hsstan {hsstan} | R Documentation |
Posterior predictive distribution
Description
Draw from the posterior predictive distribution of the outcome.
Usage
## S3 method for class 'hsstan'
posterior_predict(object, newdata = NULL, nsamples = NULL, seed = NULL, ...)
Arguments
object |
An object of class |
newdata |
Optional data frame containing the variables to use to
predict. If |
nsamples |
A positive integer indicating the number of posterior samples
to use. If |
seed |
Optional integer defining the seed for the pseudo-random number generator. |
... |
Currently ignored. |
Value
A matrix of size S
by N
, where S
is the number of simulations from
the posterior predictive distribution, and N
is the number of data points.
Examples
# continued from ?hsstan
posterior_predict(hs.biom)
[Package hsstan version 0.8.2 Index]