Recent Releases of tidybayes
tidybayes - tidybayes 3.0.7
New features:
- Add support for
draw_indicesparameter inspread_draws()andgather_draws(). (#323)
Bug fixes:
- Support for matrix columns in
nest_rvars()andunnest_rvars(). (#316) - Fix some named dimensions being converted to numeric indices in
spread_draws()on R >= 4.5.
- R
Published by mjskay over 1 year ago
tidybayes - tidybayes 3.0.6
Deprecations:
- Using
recover_types()with character vectors is now deprecated, as the expected order of the levels of the variable is ambiguous, leading to hard-to-spot errors where indices and names do not line up correctly. A warning message has been added suggesting the use of factors instead. (#312)
Bug fixes:
- Make test for
residual_draws()more robust (due to change in default value of themethodargument tobrms::residuals()). (#313)
- R
Published by mjskay over 2 years ago
tidybayes - tidybayes 3.0.4
Bug fixes:
- Fix test for
summarise_draws.grouped_df()due to changes in howposterior::summarise_draws()handles thenum_argsargument.
- R
Published by mjskay almost 3 years ago
tidybayes - tidybayes 3.0.3
- Much improved documentation of the difference between
epred,linpred, andpredictedinadd_XXX_rvars(). - Fixes for compatibility with changes and deprecations in
dplyrandtidyr. - Add note about argument name changes to
fitted_draws()deprecation warning (#288). - More correct error message for
epred_draws()on rethinking models. - Use
posterior::as_draws_df()instead ofAs.mcmc.list()forrstanobjects.
- R
Published by mjskay about 3 years ago
tidybayes - tidybayes 3.0.2
- Future-proof against changes coming in ggdist 3.1 (unification of
stat_...andstat_dist_...) - Minor fixes for R 3.5/3.6 compatibility
- Use
@examplesIffor conditional examples (#294) - Warn when input names in
compose_data()are overwritten by generated names (#295)
- R
Published by mjskay about 4 years ago
tidybayes - tidybayes 3.0.1
Minor update for compatibility with brms 2.16.0.
- R
Published by mjskay over 4 years ago
tidybayes - tidybayes 3.0.0
Breaking changes and deprecations:
- The
[add_]XXX_draws()(predicted_draws(),add_predicted_draws(), etc) functions have been substantially restructured:add_fitted_draws()andfitted_draws()are now deprecated, along with thescaleargument. Several years' teaching experience has demonstrated that "fitted" is a very confusing name for students. Use the more-specific [add_]linpred_draws()if you want draws from the linear predictor or the new [add_]epred_draws()if you want draws from the expectation of the posterior predictive (which is whatfitted_draws()was most typically used for).- Arguments for renaming output columns are now all called
value, but retain function-specific default column names. E.g. thepredictionargument forpredicted_draws()is now spelledvaluebut has a default of".prediction". One breaking change is that the default output column forlinpred_draws()is now".linpred"instead of".value". This should make it easier to combine outputs across multiple functions while also making it easier to remember the name of the argument that changes the output column name. - The
nargument is now spelledndrawsto be more consistent with terminology in theposteriorpackage and to prevent partial argument name matching bugs withnewdata. - The first argument to all of these functions is now
objectinstead ofmodel, in order to match with argument names inposterior_predict(), etc. This was necessary to prevent partial argument name matching bugs with certain model types inrstanarmthat have anmargument to their prediction functions.
New features:
- Support for the new
posteriorpackage:- Several new
_rvarscounterparts to the_drawsfamily of functions, includingspread_rvars(),gather_rvars(),epred_rvars(),linpred_rvars(), andpredicted_rvars(), which add columns ofposterior::rvar()objects to data frames instead of long-format columns of draws. These can be easier to read and take up less memory than the long-format data frames of draws. Seevignette("tidy-posterior")for examples. - The
nest_rvars()andunnest_rvars()functions for converting between data frames ofrvars and long format data frames of draws. tidy_draws()has been rebuilt on top ofposterior::as_draws_df(), which means it should support even more model types and benefit from efficiency improvements inposterior. This means thatcmdstanris now supported, for example.- An implementation of
posterior::summarise_draws()for grouped data frames of draws:summarise_draws.grouped_df() compare_levels()now supports data frames ofposterior::rvar()s.
- Several new
- The
epred_draws(),linpred_draws(), andpredicted_draws()functions should now support any models that implementposterior_epred(),posterior_linpred(), andposterior_predict()so long as they take anewdataargument. - Several dependencies have been removed or demoted to Suggests, including
forcats,plyr, andpurrr. - Added the option to set the
seedwhen subsampling to several functions (#276).
New documentation:
vignette("tidy-posterior")describing the use oftidybayeswithposterior, and particularly theposterior::rvar()data type. This vignette also includes an updated version of the ordinal regression example fromvignette("tidy-brms"), now with an illustration of the relationship between the latent linear predictor and the category-level probabilities.
Bug fixes:
- Omit sampler parameters in
tidy_draws()if retrieving them results in an error (#244)
- R
Published by mjskay over 4 years ago
tidybayes - tidybayes 2.3.1
- Allow user-specified names for comparisons in
compare_levels()(#272) - Allow contrasts from the
emmeanspackage to be used withcompare_levels()via the newemmeans_comparison()function (#272)
- R
Published by mjskay over 5 years ago
tidybayes - tidybayes 2.1.1
- Initial split of
tidybayesintotidybayesandggdist(#250).ggdistnow contains all stats/geoms from tidybayes (except deprecated ones), all support functions for stats/geoms (such aspoint_interval()),vignette("slabinterval"), andvignette("freq-uncertainty-vis").tidybayesretains all other functions, and re-exports allggdistfunctions for now. - All stats and geoms now support automatic orientation detection (#257), following the new automatic orientation
detection approach in
ggplot2. If needed, this can be overridden using the existingorientationparameter.- All
h-suffix geoms are now deprecated. Theh-suffix geoms have been left intidybayesand give a deprecation warning when used; they cannot be used fromggdistdirectly. - The
h-suffixpoint_interval()functions are also deprecated, since they are not needed in tidybayes nor inggplot2::stat_summary(). geom_interval(),geom_pointinterval(), andgeom_lineribbon()no longer automatically set theyminandymaxaesthetics if.loweror.upperare present in the data. This allows them to work better with automatic orientation detection (and was a bad feature to have existed in the first place anyway). The deprecatedtidybayes::geom_intervalh()andtidybayes::geom_pointintervalh()still automatically set those aesthetics, since they are deprecated anyway (so supporting the old behavior is fine in these functions).
- All
geom_lineribbon()/stat_lineribbon()now supports astepargument for creating stepped lineribbons (#249). H/T to Solomon Kurz for the suggestion.ggdistnow has its own implementation of the scaled and shifted Student's t distribution (dstudent_t(),qstudent_t(), etc), since it is very useful for visualizing confidence distributions. That is re-exported intidybayesas well`.- All deprecated functions and geoms now throw deprecation warnings (previously, several deprecated functions did not).
- R
Published by mjskay over 5 years ago
tidybayes - tidybayes 2.0.3
Minor fixes for changes in tibble 3.0.0
- R
Published by mjskay almost 6 years ago
tidybayes - tidybayes 2.0.2
Various minor forward and backward compatibility fixes:
- Fix
stringsAsFactorsissues for R 4 - Fix issues with
[[<-for R 4 - Fix minor issues with dplyr 1.0.0
- Use
parse()instead ofstr2lang()for compatibility with R <= 3.6
- R
Published by mjskay almost 6 years ago
tidybayes - tidybayes 2.0.1
- Various geoms and stats have been merged together under the
geom_slabinterval()andstat_slabinterval()"meta-geom" (#84). This has enabled a bunch of new geoms to be created (seevignette("slabinterval")and fixed a number of outstanding issues:- Histogram geoms and histogram+interval geoms (#162)
- CCDF bar charts and gradient plots
- The alpha aesthetic can now be mapped on eye plots (and all related geoms) (#163)
- Vertical version of eye plot (and vertical/horizontal variants of all slabinterval variants) (#56)
- Intervals and densities are now correctly grouped in eye plots (e.g. when dodging) (#83)
- Fill and color aesthetics can now be mapped within the slab part of eyes (and all slabintervals), allowing gradients to be made easily (#136) and regions of practical equivalence (ROPEs) to be annotated easily. Examples of ROPEs have been added to the main vignettes (#129).
- Intervals and eyes support
position = "dodge"correctly (#180) - The new geoms (and replacements for old ones) have custom scales allowing fine-grained targeting of fill, color, and size aesthetics of all the component parts of the composite geoms.
- There is a new sub-family of auto-sizing Wilkinson dotplot stats and geoms,
geom_dots()andgeom_dotsinterval()(#210). These include aquantilesparameter on the stats to make it easy to create quantile dotplots.
- Analytical distributions can be visualized using the new
stat_dist_...family of geoms for both thegeom_slabinterval()family andgeom_lineribbon()(seestat_dist_slabinterval()andstat_dist_lineribbon()). - The new
parse_dist(), which parses distribution specifications (likenormal(0,1)) into tidy columns, can be combined with thestat_dist_...family of geoms to easily to visualize priors (e.g. frombrms). - New distribution functions for the marginal LKJ distribution (
dlkjcorr_marginal()and company), combined withparse_dist()and thestat_dist_...family make it easy to visualize the marginal LKJ prior on a cell in a correlation matrix. (#191 #192) - There is a new vignette on frequentist uncertainty visualization,
vignette("freq-uncertainty-vis"), also made possible by the newstat_dist_...family of geoms (#188) tidy_draws()can now be applied to already-tidied data frames, allowing dependent functions (likespread_draws()andgather_draws()) to also be applied to data frames directly (#82). This can be a useful optimization in workflows where the initial tidying is slow but spreading/gathering is fast (see discussion in #144)- Kruschke-style distribution-of-distribution plots are now easier to construct with
stat_dist_slabh(). An example of this usage is invignette("tidy-brms"). hdi()now uses trimmed densities by default to avoid odd behavior with bounded distributions (#165).compare_levels(comparison = )now uses a modern tidy approach to dealing with unevaluated expressions, sorlang::exprs()can be used in place ofplyr::.()(#174, #175)geom_lineribbon()now works withggnewscale(#178)fitted_draws()/predicted_draws()give more helpful error messages on unsupported models (#177)
- R
Published by mjskay about 6 years ago
tidybayes - tidybayes 1.1.0
New features and documentation:
- Support matrices, n-d arrays, and lists of vectors in compose_data (#159)
- Support nested vectors, matrices, n-d arrays, and ragged arrays through x[.,.] syntax in gather/spread_draws (#154)
- Add detached-line-ribbon HOPs example for ordinal models in brms vignette
Bug fixes:
- Fixed errors on CRAN from changes in brms
- Properly handle dirichlet responses in predicted_draws (#164)
- R
Published by mjskay over 6 years ago
tidybayes - tidybayes 1.0.4
- Fixed errors on CRAN from changes in dplyr
New features and documentation:
- Initial support for addresidualdraws, towards #133
- Add tidybayes-residuals vignette
- Add adddraws to support models that add[fitted|predicted]_draws does not (closes #149)
- Add sample_draws to make it easier to take fewer draws anywhere in the pipeline (towards #144)
- Add hypothetical outcome plots (HOPs) to examples
Minor changes:
- Fix bug to support multivariate models in predicted_draws, closes #134
- Add support for emmlist in gatheremmeans_draws, closes #126
- Default for show.legend no longer omits all guides
- Make default lineribbon color black, closes #153
- R
Published by mjskay about 7 years ago
tidybayes - tidybayes 1.0.3
- Added
gather_pairsmethod for creating custom scatterplot matrices (and more!) - Ordinal models in brms now use original category labels (#122)
NAvalues are now better supported inpoint_interval, and it has an na.rm argument (#123)- Added sampler diagnostics to tidy_draws() stan output (#109)
- Added MCMCglmm+emmeans example to vignettes
- Add guards to prevent usage of packages listed in
Suggests
- R
Published by mjskay over 7 years ago
tidybayes - tidybayes 1.0.1
Major changes:
- First CRAN release.
- Various function, argument, and column name changes towards unification with the Stan ecosystem. See help("tidybayes-deprecated") for more information.
- R
Published by mjskay over 7 years ago
tidybayes - tidybayes 0.12.1.9000
This is a pre-release of tidybayes.
- R
Published by mjskay over 7 years ago