Learn R Programming

⚠️There's a newer version (3.0.7) of this package.Take me there.

tidybayes (version 1.0.1)

Tidy Data and 'Geoms' for Bayesian Models

Description

Compose data for and extract, manipulate, and visualize posterior draws from Bayesian models ('JAGS', 'Stan', 'rstanarm', 'brms', 'MCMCglmm', 'coda', ...) in a tidy data format. Functions are provided to help extract tidy data frames of draws from Bayesian models and that generate point summaries and intervals in a tidy format. In addition, 'ggplot2' 'geoms' and 'stats' are provided for common visualization primitives like points with multiple uncertainty intervals, eye plots (intervals plus densities), and fit curves with multiple, arbitrary uncertainty bands.

Copy Link

Version

Install

install.packages('tidybayes')

Monthly Downloads

11,100

Version

1.0.1

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Matthew Kay

Last Published

August 2nd, 2018

Functions in tidybayes (1.0.1)

combine_chains

Combine the chain and iteration columns of tidy data frames of draws
geom_eye

Eye plots of densities with point and interval summaries (ggplot geom)
density_bins

Density bins as data frames suitable for use with predict_curve
gather_emmeans_draws

Extract a tidy data frame of draws of posterior distributions of "estimated marginal means" (emmeans/lsmeans) from a Bayesian model fit.
stat_pointinterval

Point summary + multiple probability interval plots (ggplot stat)
data_list

Data lists for input into Bayesian models
get_variables

Get the names of the variables in a fitted Bayesian model
tidy-format-translators

Translate between different tidy data frame formats for draws from distributions
compare_levels

Compare the value of draws of some variable from a Bayesian model for different levels of a factor
recover_types

Decorate a model fit or sample with data types recovered from the input data
RankCorr

Thinned subset of posterior sample from a Bayesian analysis of perception of correlation.
geom_halfeyeh

Half-eye plots of densities with point and interval summaries (ggplot geom)
geom_lineribbon

Line + multiple probability ribbon plots (ggplot geom)
stat_interval

Multiple probability interval plots (ggplot stat)
gather_draws

Extract draws of variables in a Bayesian model fit into a tidy data format
add_fitted_draws

Add draws from (possibly transformed) posterior linear predictors (the "fit") or from posterior predictions of a model to a data frame
geom_interval

Multiple probability interval plots (ggplot geom)
geom_pointinterval

Point + multiple probability interval plots (ggplot geom)
n_prefix

Prefix function generator for composing dimension index columns
point_interval

Point and interval summaries for tidy data frames of draws from distributions
stat_lineribbon

Line + multiple probability ribbon stat for ggplot
tidybayes-ggproto

Base ggproto classes for tidybayes
ungather_draws

Turn tidy data frames of variables from a Bayesian model back into untidy data
predict_curve

Deprecated: Prediction curves for arbitrary functions of posteriors
tidybayes-deprecated

Deprecated functions, arguments, and column names in tidybayes
tidy_draws

Get a sample of posterior draws from a model as a tibble
x_at_y

Generate lookup vectors for composing nested indices
tidybayes-models

Models supported by tidybayes
compose_data

Compose data for input into a Bayesian model
gather_variables

Gather variables from a tidy data frame of draws from variables into a single column