Generic function for drawing from the posterior predictive distribution
Source:R/posterior_predict.R
posterior_predict.RdDraw from the posterior predictive distribution of the outcome. See posterior_predict.stanreg() in the rstanarm package for an example.
Value
posterior_predict() methods should return a \(D\) by \(N\)
matrix, where \(D\) is the number of draws from the posterior predictive
distribution and \(N\) is the number of data points being predicted per
draw.
See also
The rstanarm package (mc-stan.org/rstanarm) for example methods (CRAN, GitHub).
Guidelines and recommendations for developers of R packages interfacing with Stan and a demonstration getting a simple package working can be found in the vignettes included with rstantools and at mc-stan.org/rstantools/articles.