Skip to contents

The faintr (FActorINTerpreteR) package provides convenience functions for evaluating Bayesian regression models for factorial designs, fitted with the brms package. The faintr package allows for the extraction of many meaningful comparisons irrespective of the encoding scheme initially used in the model.

Details

The package provides the following functions:

get_cell_definitions returns information about the factors and their internal encoding scheme used in the regression model. It does so by extracting a minimal design matrix from the model.

extract_cell_draws uses the cell definitions returned by get_cell_definitions to extract posterior draws based on a user-defined subset of factorial design cells. If no subset is passed, the function returns draws for the grand mean.

compare_groups calls extract_cell_draws on two subsets of cells and returns summary statistics of the group comparison, such as the mean difference and its credible interval.

For more information on how to use faintr, see vignette("faintr_basics").

Note

The faintr package currently does not support multivariate models and models that use families categorical, dirichlet, multinomial, and logistic_normal. Furthermore, models must not include special effect terms mo(), mi(), me(), and cs() for fixed effects. Also note that faintr currently does not support models where the intercept is a population-level parameter (class b), as is the case when using the 0 + Intercept syntax in the brm function call.

References

Bürkner, P.-C. (2017). brms: An R Package for Bayesian Multilevel Models Using Stan. Journal of Statistical Software, 80(1), 1-28. doi:10.18637/jss.v080.i01

See also