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 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

Extracting fits, predictions, and residuals

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

add_fitted_draws() fitted_draws() add_linpred_draws() linpred_draws() add_predicted_draws() predicted_draws() add_residual_draws() residual_draws()

Add draws from the (possibly transformed) posterior linear predictors (the "fit") of a model, the posterior predictions of a model, or the 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

combine_chains()

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

compare_levels()

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

gather_pairs()

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

gather_variables()

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

density_bins() histogram_bins()

Density bins as data frames suitable for use with predict_curve

predict_curve() predict_curve_density()

Deprecated: Prediction curves for arbitrary functions of posteriors

to_broom_names() from_broom_names() to_ggmcmc_names() from_ggmcmc_names()

Translate between different tidy data frame formats for draws from distributions

Point summaries and intervals

Calculate point summaries and intervals on (grouped) data frames of draws

point_interval() point_intervalh() qi() hdi() Mode() hdci() mean_qi() mean_qih() median_qi() median_qih() mode_qi() mode_qih() mean_hdi() mean_hdih() median_hdi() median_hdih() mode_hdi() mode_hdih() mean_hdci() mean_hdcih() median_hdci() median_hdcih() mode_hdci() mode_hdcih()

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

Visualizing draws

Geoms for visualizing tidy data frames of draws

geom_eye() geom_eyeh()

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

geom_halfeyeh()

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

geom_interval() geom_intervalh()

Multiple probability interval plots (ggplot geom)

geom_lineribbon()

Line + multiple probability ribbon plots (ggplot geom)

geom_pointinterval() geom_pointintervalh()

Point + multiple probability interval plots (ggplot geom)

stat_interval() stat_intervalh()

Multiple probability interval plots (ggplot stat)

stat_lineribbon()

Line + multiple probability ribbon stat for ggplot

stat_pointinterval() stat_pointintervalh()

Point summary + multiple probability interval plots (ggplot stat)

GGplot theme

Tidybayes theme for ggplot2

theme_tidybayes() facet_title_left_horizontal() facet_title_right_horizontal() axis_titles_bottom_left()

Simple, light ggplot2 theme for tidybayes

Other

Other functions and documentation

tidybayes-deprecated

Deprecated functions, arguments, and column names in tidybayes

tidybayes-models

Models supported by tidybayes