bayestestR 0.17.0.xxx
CRAN release: 2025-08-29
New functionality
-
as.matrix()forbayesfactor_restricted(), to obtain a matrix of Bayes factors between all restricted models.
bayestestR 0.17.0
CRAN release: 2025-08-29
Changes
rope()(and by extensionp_rope()) gain a newcomplementargument such thatrope(x, complement = TRUE)returns the ROPE posterior probability together with the posterior probabilities above/below the ROPE (the complementary probabilities).Added
display()methods for bayestestR objects. Thedisplay()methods also get a newformatoption,format = "tt", to produce tables with thetinytablepackage.The long deprecated
rnorm_perfect()function has been removed. Usedistribution_normal()instead.Prepare for upcoming changes in marginaleffects (0.29.0).
bayestestR 0.16.1
CRAN release: 2025-07-01
Changes
Improved efficiency for
describe_posterior().Minor improvements for models with multinomial response variables.
Minor improvements for mixture models from package brms.
bayestestR 0.16.0
CRAN release: 2025-05-20
Changes
- Revised code-base to address changes in latest insight update. Dealing with larger models (many parameters, many posterior samples) from packages brms and rstanarm is more efficient now. Furthermore, the options for the
effectsargument have a new behavior."all"only returns fixed effects and random effects variance components, but no longer the group level estimates. Useeffects = "full"to return all parameters. This change is mainly to be more flexible and gain more efficiency for models with many parameters and / or many posterior draws.
bayestestR 0.15.3
CRAN release: 2025-04-28
Changes
-
effective_sample(), and functions that calleffective_sample()(likedescribe_posterior()with the respectivetestoption) now also return the tail ESS.
Bug fixes
describe_posterior()now returns a columns with response levels for marginaleffects objects applied to categorical or multinomial Stan models.describe_posterior()now returns a columns with response variables for marginaleffects objects applied to multivariate response Stan models.Fixed issue in
map_estimate()andpoint_estimate(centrality = "MAP")for vectors with only one unique value.
bayestestR 0.15.2
CRAN release: 2025-02-07
Changes
describe_posterior()no longer re-samples a model when computing indices.describe_posterior()calls tests only when needed. Before, there was a minimal overhead by calling tests that were not requested.
bayestestR 0.15.1
CRAN release: 2025-01-17
Bug fixes
- Fix to
emmeans/marginaleffects/data.frame(<rvar>)methods when using multiple credible levels (#688).
bayestestR 0.15.0
CRAN release: 2024-10-17
Changes
Support for
posterior::rvar-type column in data frames. For example, a data framedfwith anrvarcolumn".pred"can now be called directly viap_direction(df, rvar_col = ".pred").Added support for marginaleffects
The ROPE or threshold ranges in
rope(),describe_posterior(),p_significance()andequivalence_test()can now be specified as a list. This allows for different ranges for different parameters.Results from objects generated by emmeans (
emmGrid/emm_list) now return results with appended grid-data.-
Usability improvements for
p_direction():Results from
p_direction()can directly be used inpd_to_p().p_direction()gets anas_pargument, to directly convert pd-values into frequentist p-values.p_direction()gets aremove_naargument, which defaults toTRUE, to removeNAvalues from the input before calculating the pd-values.Besides the existing
as.numeric()method,p_direction()now also has anas.vector()method.
p_significance()now accepts non-symmetric ranges for thethresholdargument.p_to_pd()now also works with data frames returned byp_direction(). If a data frame contains apd,p_directionorPDcolumn name, this is assumed to be the pd-values, which are then converted to p-values.p_to_pd()for data frame inputs gets aas.numeric()andas.vector()method.
bayestestR 0.14.0
CRAN release: 2024-07-24
Breaking Changes
- Arguments named
group,at,group_byandsplit_bywill be deprecated in future releases of easystats packages. Please usebyinstead. This affects following functions in bayestestR:estimate_density().
Changes
bayesian_as_frequentist()now supports more model families from Bayesian models that can be successfully converted to their frequentists counterparts.bayesfactor_models()now throws an informative error when Bayes factors for comparisons could not be calculated.
Bug fixes
- Fixed issue in
bayesian_as_frequentist()for brms models with0 + Interceptspecification in the model formula.
bayestestR 0.13.2
CRAN release: 2024-02-12
Breaking Changes
pd_to_p()now returns 1 and a warning for values smaller than 0.5.map_estimate(),p_direction(),p_map(), andp_significance()now return a data-frame when the input is a numeric vector. (making the output consistently a data frame for all inputs.)Argument
posteriorswas renamed intoposterior. Before, there were a mix of both spellings, now it is consistentlyposterior.
Bug fixes
Fixed issues in various
format()methods, which did not work properly for some few functions (likep_direction()).Fixed issue in
estimate_density()for double vectors that also had other class attributes.Fixed several minor issues and tests.
bayestestR 0.13.1
CRAN release: 2023-04-07
Changes
Improved speed performance when functions are called using
do.call().Improved speed performance to
bayesfactor_models()forbrmsfitobjects that already included amarglikelement in the model object.
New functionality
-
as.logical()forbayesfactor_restricted()results, extracts the boolean vector(s) the mark which draws are part of the order restriction.
Bug fixes
p_map()gains a newnullargument to specify any non-0 nulls.Fixed non-working examples for
ci(method = "SI").Fixed wrong calculation of rope range for model objects in
describe_posterior().Some smaller bug fixes.
bayestestR 0.13.0
CRAN release: 2022-09-18
Breaking
The minimum needed R version has been bumped to
3.6.contr.equalprior(contrasts = FALSE)(previouslycontr.orthonorm) no longer returns an identity matrix, but a shifteddiag(n) - 1/n, for consistency.
New functionality
-
p_to_bf(), to convert p-values into Bayes factors. For more accurate approximate Bayes factors, usebic_to_bf(). -
bayestestR now supports objects of class
rvarfrom package posterior. -
contr.equalprior(previouslycontr.orthonorm) gains two new functions:contr.equalprior_pairsandcontr.equalprior_deviationsto aide in setting more intuitive priors.
Changes
- has been renamed
contr.equalpriorto be more explicit about its function. -
p_direction()now accepts objects of classparameters_model()(fromparameters::model_parameters()), to compute probability of direction for parameters of frequentist models.
bayestestR 0.12.1
CRAN release: 2022-05-02
Breaking
Bayesfactor_models()for frequentist models now relies on the updatedinsight::get_loglikelihood(). This might change some results for REML based models. See documentation.estimate_density()argumentgroup_byis renamedat.All
distribution_*(random = FALSE)functions now rely onppoints(), which will result in slightly different results, especially with smallns.Uncertainty estimation now defaults to
"eti"(formerly was"hdi").
Changes
bayestestR functions now support
drawsobjects from package posterior.rope_range()now handles log(normal)-families and models with log-transformed outcomes.New function
spi(), to compute shortest probability intervals. Furthermore, the"spi"option was added as new method to compute uncertainty intervals.
Bug fixes
-
bci()for some objects incorrectly returned the equal-tailed intervals.
bayestestR 0.11.1
New functions
-
describe_posterior()gains aplot()method, which is a short cut forplot(estimate_density(describe_posterior())).
bayestestR 0.11
Bug fixes
Fixed issues related to last brms update.
Fixed bug in
describe_posterior.BFBayesFactor()where Bayes factors were missing from out put ( #442 ).
bayestestR 0.10.0
CRAN release: 2021-05-31
Breaking
- All Bayes factors are now returned as
log(BF)(column namelog_BF). Printing is unaffected. To retrieve the raw BFs, you can runexp(result$log_BF).
New functions
-
bci()(and its aliasbcai()) to compute bias-corrected and accelerated bootstrap intervals. Along with this new function,ci()anddescribe_posterior()gain a newci_methodtype,"bci".
bayestestR 0.9.0
CRAN release: 2021-04-08
Breaking
The default
ciwidth has been changed to 0.95 instead of 0.89 (see here). This should not come as a surprise to the long-time users ofbayestestRas we have been warning about this impending change for a while now :)Column names for
bayesfactor_restricted()are nowp_priorandp_posterior(wasPrior_probandPosterior_prob), to be consistent withbayesfactor_inclusion()output.Removed the experimental function
mhdior.
General
Support for
blavaanmodels.Support for
blrmmodels (rmsb).Support for
BGGMmodels (BGGM).check_prior()anddescribe_prior()should now also work for more ways of prior definition in models from rstanarm or brms.
Bug fixes
Fixed bug in
print()method for themediation()function.Fixed remaining inconsistencies with CI values, which were not reported as fraction for
rope().Fixed issues with special prior definitions in
check_prior(),describe_prior()andsimulate_prior().
bayestestR 0.8.2
CRAN release: 2021-01-26
Changes to functions
- All
.stanregmethods gain acomponentargument, to also include auxiliary parameters.
Bug fixes
bayesfactor_parameters()no longer errors for no reason when computing extremely un/likely direction hypotheses.bayesfactor_pointull()/bf_pointull()are nowbayesfactor_pointnull()/bf_pointnull()(can you spot the difference? #363 ).
bayestestR 0.8.0
CRAN release: 2020-12-05
New functions
-
sexit(), a function for sequential effect existence and significance testing (SEXIT).
General
Added startup-message to warn users that default ci-width might change in a future update.
Added support for mcmc.list objects.
Bug fixes
unupdate()gains anewdataargument to work withbrmsfit_multiplemodels.Fixed issue in Bayes factor vignette (don’t evaluate code chunks if packages not available).
bayestestR 0.7.5
CRAN release: 2020-10-22
New functions
Added
as.matrix()function forbayesfactor_modelarrays.unupdate(), a utility function to get Bayesian models un-fitted from the data, representing the priors only.
Bug fixes
Fixed issue with default rope range for
BayesFactormodels.Fixed issue in collinearity-check for
rope()for models with less than two parameters.Fixed issue in print-method for
mediation()withstanmvreg-models, which displays the wrong name for the response-value.Fixed issue in
effective_sample()for models with only one parameter.rope_range()forBayesFactormodels returns non-NAvalues ( #343 )
bayestestR 0.7.2
CRAN release: 2020-07-20
New functions
-
mediation(), to compute average direct and average causal mediation effects of multivariate response models (brmsfit,stanmvreg).
Bug fixes
-
bayesfactor_parameters()works withR<3.6.0.
bayestestR 0.7.0
CRAN release: 2020-06-19
Changes to functions
weighted_posteriors()can now be used with data frames.Revised
print()fordescribe_posterior().Improved value formatting for Bayesfactor functions.
Bug fixes
Link transformation are now taken into account for
emmeansobjets. E.g., indescribe_posterior().Fix
diagnostic_posterior()when algorithm is not “sampling”.Minor revisions to some documentations.
Fix CRAN check issues for win-old-release.
bayestestR 0.6.0
CRAN release: 2020-04-20
Changes to functions
describe_posterior()now also works oneffectsize::standardize_posteriors().p_significance()now also works onparameters::simulate_model().rope_range()supports more (frequentis) models.
Bug fixes
Fixed issue with
plot()data.frame-methods ofp_direction()andequivalence_test().Fix check issues for forthcoming insight-update.
bayestestR 0.5.3
CRAN release: 2020-03-26
Changes to functions
-
estimate_density()now also works on grouped data frames.
Bug fixes
Fixed bug in
weighted_posteriors()to properly weight Intercept-onlyBFBayesFactormodels.Fixed bug in
weighted_posteriors()when models have very low posterior probability ( #286 ).Fixed bug in
describe_posterior(),rope()andequivalence_test()for brmsfit models with monotonic effect.Fixed issues related to latest changes in
as.data.frame.brmsfit()from the brms package.
bayestestR 0.5.0
CRAN release: 2020-01-18
General
Added
p_pointnull()as an alias top_MAP().Added
si()function to compute support intervals.Added
weighted_posteriors()for generating posterior samples averaged across models.Added
plot()-method forp_significance().p_significance()now also works for brmsfit-objects.estimate_density()now also works for MCMCglmm-objects.equivalence_test()getseffectsandcomponentarguments for stanreg and brmsfit models, to print specific model components.Support for mcmc objects (package coda)
Provide more distributions via
distribution().Added
distribution_tweedie().Better handling of
stanmvregmodels fordescribe_posterior(),diagnostic_posterior()anddescribe_prior().
Breaking changes
point_estimate(): argumentcentralitydefault value changed from ‘median’ to ‘all’.p_rope(), previously as exploratory index, was renamed asmhdior()(for Max HDI inside/outside ROPE), asp_rope()will refer torope(..., ci = 1)( #258 )
Bug fixes
Fixed mistake in description of
p_significance().Fixed error when computing BFs with
emmGridbased on some non-linear models ( #260 ).Fixed wrong output for percentage-values in
print.equivalence_test().Fixed issue in
describe_posterior()forBFBayesFactor-objects with more than one model.
bayestestR 0.4.0
CRAN release: 2019-10-20
New functions / features
convert_bayesian_to_frequentist()Convert (refit) Bayesian model as frequentistdistribution_binomial()for perfect binomial distributionssimulate_ttest()Simulate data with a mean differencesimulate_correlation()Simulate correlated datasetsp_significance()Compute the probability of Practical Significance (ps)overlap()Compute overlap between two empirical distributionsestimate_density():method = "mixture"argument added for mixture density estimation
Bug fixes
- Fixed bug in
simulate_prior()for stanreg-models whenautoscalewas set toFALSE
bayestestR 0.3.0
CRAN release: 2019-09-22
General
- revised
print()-methods for functions likerope(),p_direction(),describe_posterior()etc., in particular for model objects with random effects and/or zero-inflation component
New functions / features
check_prior()to check if prior is informativesimulate_prior()to simulate model’s priors as distributionsdistribution_gamma()to generate a (near-perfect or random) Gamma distributioncontr.bayesfunction for orthogonal factor coding (implementation from Singmann & Gronau’sbfrms, used for proper prior estimation when factor have 3 levels or more. See Bayes factor vignette ## Changes to functionsAdded support for
sim,sim.merMod(fromarm::sim()) andMCMCglmm-objects to many functions (likehdi(),ci(),eti(),rope(),p_direction(),point_estimate(), …)describe_posterior()gets aneffectsandcomponentargument, to include the description of posterior samples from random effects and/or zero-inflation component.More user-friendly warning for non-supported models in
bayesfactor()-methods
Bug fixes
Fixed bug in
bayesfactor_inclusion()where the same interaction sometimes appeared more than once (#223)Fixed bug in
describe_posterior()for stanreg models fitted with fullrank-algorithm
bayestestR 0.2.5
CRAN release: 2019-08-06
Breaking changes
rope_range()for binomial model has now a different default (-.18; .18 ; instead of -.055; .055)rope(): returns a proportion (between 0 and 1) instead of a value between 0 and 100p_direction(): returns a proportion (between 0.5 and 1) instead of a value between 50 and 100 (#168)bayesfactor_savagedickey():hypothesisargument replaced bynullas part of the newbayesfactor_parameters()function
New functions / features
density_at(),p_map()andmap_estimate():methodargument addedrope():ci_methodargument addedeti(): Computes equal-tailed intervalsreshape_ci(): Reshape CIs between wide/longbayesfactor_parameters(): New function, replacingbayesfactor_savagedickey(), allows for computing Bayes factors against a point-null or an interval-nullbayesfactor_restricted(): Function for computing Bayes factors for order restricted models
Bug fixes
-
bayesfactor_inclusion()now works withR < 3.6.
bayestestR 0.2.2
CRAN release: 2019-06-20
Breaking changes
equivalence_test(): returns capitalized output (e.g.,Rejectedinstead ofrejected)describe_posterior.numeric():dispersiondefaults toFALSEfor consistency with the other methods
New functions / features
pd_to_p()andp_to_pd(): Functions to convert between probability of direction (pd) and p-valueSupport of
emmGridobjects:ci(),rope(),bayesfactor_savagedickey(),describe_posterior(), …
Bug fixes
describe_posterior(): Fixed column order restorationbayesfactor_inclusion(): Inclusion BFs for matched models are more inline with JASP results.
bayestestR 0.2.0
CRAN release: 2019-05-29
Breaking changes
plotting functions now require the installation of the
seepackageestimateargument name indescribe_posterior()andpoint_estimate()changed tocentralityhdi(),ci(),rope()andequivalence_test()defaultcito0.89rnorm_perfect()deprecated in favour ofdistribution_normal()map_estimate()now returns a single value instead of a dataframe and thedensityparameter has been removed. The MAP density value is now accessible viaattributes(map_output)$MAP_density
New functions / features
describe_posterior(),describe_prior(),diagnostic_posterior(): added wrapper functionpoint_estimate()added function to compute point estimatesp_direction(): new argumentmethodto compute pd based on AUCarea_under_curve(): compute AUCdistribution()functions have been addedbayesfactor_savagedickey(),bayesfactor_models()andbayesfactor_inclusion()functions has been addedStarted adding plotting methods (currently in the
seepackage) forp_direction()andhdi()probability_at()as alias fordensity_at()effective_sample()to return the effective sample size of Stan-modelsmcse()to return the Monte Carlo standard error of Stan-models
Minor changes
Improved documentation
Improved testing
p_direction(): improved printingrope()for model-objects now returns the HDI values for all parameters as attribute in a consistent wayChanges legend-labels in
plot.equivalence_test()to align plots with the output of theprint()-method (#78)
bayestestR 0.1.0
CRAN release: 2019-04-08
CRAN initial publication and 0.1.0 release
Added a
NEWS.mdfile to track changes to the package
