posterior_predict: Posterior predictive simulation

View source: R/posterior_predict.R

posterior_predictR Documentation

Posterior predictive simulation

Description

Generate replicated outcomes from an estimated BayesRTMB model. Regression wrappers provide an automatic simulator. For a custom model, supply an 'rtmb_code()' object containing a 'generate' block that creates and reports one replicated outcome vector. MCMC and variational fits use posterior draws. A MAP fit uses sampling-based uncertainty when available and otherwise conditions on its point estimate.

Usage

posterior_predict(object, ...)

## S3 method for class 'RTMB_Fit_Base'
posterior_predict(object, ...)

Arguments

object

A BayesRTMB fit object.

...

Arguments passed to the fit object's 'posterior_predict()' method.

Value

A numeric matrix with posterior predictive draws in rows and observations in columns.


BayesRTMB documentation built on Nov. 24, 2026, 9:06 a.m.