posterior_predict: Posterior Predictive Distribution

Description Usage Arguments Value Note Examples

View source: R/posterior_predict.R

Description

Draw samples from the posterior predictive distribution.

Usage

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

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)

Value

A 3D array containing the predicted datasets

Note

Currently only implemented for type = "mixed", type = "ordinal", and type = "binary". Note the term mixed is confusing, in that it can be used with only, say, ordinal data. In this case, reestimate the model with type = "mixed" until all data types are supported.

Examples

1
2
3
4
5
6
7
Y <- gss

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

yrep <- posterior_predict(fit, iter = 100)

BGGM documentation built on Aug. 20, 2021, 5:08 p.m.