post_pred: posterior predictive extraction

View source: R/postpred_extraction.R

print.tbl_post_predR Documentation

posterior predictive extraction

Description

MCMC predicted values are extracted from a Bayesian (regression) object and returned as a tidy tbl_post_pred object.

Usage

## S3 method for class 'tbl_post_pred'
print(x, ...)

## S3 method for class 'tbl_predicted'
print(x, ...)

## S3 method for class 'tbl_post_pred'
knit_print(x, ...)

## S3 method for class 'tbl_predicted'
knit_print(x, ...)

post_pred(model, scale = "obs", model_name, thin = 1)

mtx_post_pred(model, ...)

## S3 method for class 'brmsfit'
mtx_post_pred(model, model_name, newdata = NULL, thin = 1, ...)

## S3 method for class 'stanreg'
mtx_post_pred(model, model_name, newdata = NULL, thin = 1, ...)

Arguments

model

Bayesian model object

scale

"response" or "lin_pred"

model_name

provides a name for the model

newdata

new data to predict from

thin

thinning factor

Value

tbl_postpred object with MCMC draws

chains are stored in a long table with the following columns:

chain iter Obs value type order (fctr) (int) (int) (dbl) (chr) (int)

Author(s)

Martin Schmettow


schmettow/bayr documentation built on March 23, 2024, 7:49 p.m.