Learn R Programming

tidybayes (version 3.0.7)

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

6,160

Version

3.0.7

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Matthew Kay

Last Published

September 15th, 2024

Functions in tidybayes (3.0.7)

n_prefix

Prefix function generator for composing dimension index columns
gather_draws

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

Nest and unnest rvar columns in data frames
gather_variables

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

Get the names of the variables in a fitted Bayesian model
gather_pairs

Gather pairwise combinations of values from key/value columns in a long-format data frame
sample_draws

Sample draws from a tidy-format data frame of draws
recover_types

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

Objects exported from other packages
tidybayes-models

Models supported by 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
gather_rvars

Extract draws from a Bayesian model into tidy data frames of random variables
tidy_draws

Get a sample of posterior draws from a model as a tibble
tidybayes-package

Tidy Data and 'Geoms' for Bayesian Models
summarise_draws.grouped_df

Summaries of draws in grouped_df objects
x_at_y

Generate lookup vectors for composing nested indices
tidybayes-deprecated

Deprecated functions, arguments, and column names in tidybayes
add_epred_draws

Add draws from the posterior fit, predictions, or residuals of a model to a data frame
emmeans_comparison

Use emmeans contrast methods with compare_levels
gather_emmeans_draws

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

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

Data lists for input into Bayesian models
add_epred_rvars

Add rvars for the linear predictor, posterior expectation, posterior predictive, or residuals of a model to a data frame
compose_data

Compose data for input into a Bayesian model
combine_chains

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

Density bins and histogram bins as data frames
add_draws

Add draws to a data frame in tidy format