## Package overview

Overview of tidybayes.

tidybayes-package

Tidy Data and 'Geoms' for Bayesian Models

tidybayes-models

Models supported by tidybayes

## Composing data for input to a model

Transform tidy data frames into data lists appropriate for model types like Stan and JAGS

compose_data()

Compose data for input into a Bayesian model

data_list() as_data_list()

Data lists for input into Bayesian models

n_prefix()

Prefix function generator for composing dimension index columns

x_at_y()

Generate lookup vectors for composing nested indices

## Extracting posteriors

Get tidy draws or rvars of posterior distributions from objects (and helper functions for examining objects)

get_variables()

Get the names of the variables in a fitted Bayesian model

recover_types()

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

gather_draws() spread_draws()

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

tidy_draws()

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

gather_emmeans_draws()

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

ungather_draws() unspread_draws()

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

gather_rvars() spread_rvars()

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

nest_rvars() unnest_rvars()

Nest and unnest rvar columns in data frames

summarise_draws(<grouped_df>)

Summaries of draws in grouped_df objects

## Extracting fits, predictions, and residuals

Get tidy draws or rvars from transformed linear predictors (“fits”), posterior predictions, or residuals

tidybayes-deprecated

Deprecated functions, arguments, and column names in tidybayes

add_epred_draws() epred_draws() add_linpred_draws() linpred_draws() add_predicted_draws() predicted_draws() add_residual_draws() residual_draws()

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

add_draws()

Add draws to a data frame in tidy format

add_epred_rvars() epred_rvars() add_linpred_rvars() linpred_rvars() add_predicted_rvars() predicted_rvars()

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

## Manipulating tidy data frames of draws

Convenience functions for common data manipulation tasks with tidy data frames of draws

sample_draws()

Sample draws from a tidy-format data frame of draws

compare_levels()

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

emmeans_comparison()

Use emmeans contrast methods with compare_levels

gather_variables()

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

gather_pairs()

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

reexports

Objects exported from other packages

combine_chains()

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

density_bins() histogram_bins()

Density bins and histogram bins as data frames

## Point summaries, intervals, geoms, and stats

For the point_interval family (median_qi, etc) and various geoms and stats for visualizing posteriors, see the ggdist documentation

## Deprecated functions

Deprecated functions

tidybayes-deprecated

Deprecated functions, arguments, and column names in tidybayes

predict_curve() predict_curve_density()

Deprecated: Prediction curves for arbitrary functions of posteriors