tidybayes-models: Models supported by tidybayes

Description All Supported Models/Sample Formats Models Supporting Prediction Extending tidybayes


Tidybayes supports two classes of models and sample formats: Models/formats that provide prediction functions, and those that do not.

All Supported Models/Sample Formats

All supported models/formats support the base tidybayes sample extraction functions, such as tidy_draws, spread_draws, and gather_draws. These models/formats include:

If you install the tidybayes.rethinking package (available at https://github.com/mjskay/tidybayes.rethinking), map and map2stan models from the rethinking package are also supported.

Models Supporting Prediction

In addition, the following models support fit and prediction extraction functions, such as add_fitted_draws and add_predicted_draws:

If your model type is not in the above list, you may still be able to use the add_draws function to turn matrices of predictive draws (or fit draws) into tidy data frames.

If you install the tidybayes.rethinking package, models from the rethinking package are also supported. Note that in tidybayes.rethinking, tidy_link takes the place of add_fitted_draws and tidy_sim takes the place of add_predicted_draws.

Extending tidybayes

To include basic support for new models, one need only implement the tidy_draws generic function for that model.

To include support for estimation and prediction, one must implement the fitted_draws and predicted_draws generic functions.

mjskay/tidybayes documentation built on Oct. 11, 2019, 5:18 p.m.