Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

posterior_table

Table Creation for Posterior Samples


Description

Create a table for unique values of posterior samples. This is usually only useful when summarizing predictions of ordinal models.

Usage

posterior_table(x, levels = NULL)

Arguments

x

A matrix of posterior samples where rows indicate samples and columns indicate parameters.

levels

Optional values of possible posterior values. Defaults to all unique values in x.

Value

A matrix where rows indicate parameters and columns indicate the unique values of posterior samples.

Examples

## Not run: 
fit <- brm(rating ~ period + carry + treat, 
           data = inhaler, family = cumulative())
pr <- predict(fit, summary = FALSE)
posterior_table(pr)

## End(Not run)

brms

Bayesian Regression Models using 'Stan'

v2.15.0
GPL-2
Authors
Paul-Christian Bürkner [aut, cre], Jonah Gabry [ctb], Sebastian Weber [ctb], Andrew Johnson [ctb], Martin Modrak [ctb]
Initial release
2021-03-10

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.