Learn R Programming

BGGM (version 2.1.5)

posterior_predict: Posterior Predictive Distribution

Description

Draw samples from the posterior predictive distribution.

Usage

posterior_predict(object, iter = 1000, progress = TRUE)

Value

A 3D array containing the predicted datasets

Arguments

object

An object of class estimate or explore

iter

Numeric. Number of samples from the predictive distribution

progress

Logical. Should a progress bar be included (defaults to TRUE)

Examples

Run this code
# \donttest{
Y <- gss

fit <- estimate(as.matrix(Y),
                impute = TRUE,
               iter = 150, type = "mixed")

yrep <- posterior_predict(fit, iter = 100)
# }

Run the code above in your browser using DataLab