-
Support for
posterior::rvar
-type column in data frames. For example, a data framedf
with anrvar
column".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_p
argument, to directly convert pd-values into frequentist p-values. -
p_direction()
gets aremove_na
argument, which defaults toTRUE
, to removeNA
values 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 thethreshold
argument. -
p_to_pd()
now also works with data frames returned byp_direction()
. If a data frame contains apd
,p_direction
orPD
column 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.
- Fixed warning in CRAN check results.
- Arguments named
group
,at
,group_by
andsplit_by
will be deprecated in future releases of easystats packages. Please useby
instead. This affects following functions in bayestestR:estimate_density()
.
-
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.
- Fixed issue in
bayesian_as_frequentist()
for brms models with0 + Intercept
specification in the model formula.
-
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
posteriors
was renamed intoposterior
. Before, there were a mix of both spellings, now it is consistentlyposterior
.
- Retrieving models from the environment was improved.
-
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.
-
Improved speed performance when functions are called using
do.call()
. -
Improved speed performance to
bayesfactor_models()
forbrmsfit
objects that already included amarglik
element in the model object.
as.logical()
forbayesfactor_restricted()
results, extracts the boolean vector(s) the mark which draws are part of the order restriction.
-
p_map()
gains a newnull
argument 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.
-
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.
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
rvar
from package posterior. contr.equalprior
(previouslycontr.orthonorm
) gains two new functions:contr.equalprior_pairs
andcontr.equalprior_deviations
to aide in setting more intuitive priors.
- has been renamed
contr.equalprior
to 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.
-
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_by
is renamedat
. -
All
distribution_*(random = FALSE)
functions now rely onppoints()
, which will result in slightly different results, especially with smalln
s. -
Uncertainty estimation now defaults to
"eti"
(formerly was"hdi"
).
-
bayestestR functions now support
draws
objects 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.
bci()
for some objects incorrectly returned the equal-tailed intervals.
- Fixes failing tests in CRAN checks.
describe_posterior()
gains aplot()
method, which is a short cut forplot(estimate_density(describe_posterior()))
.
-
Fixed issues related to last brms update.
-
Fixed bug in
describe_posterior.BFBayesFactor()
where Bayes factors were missing from out put ( #442 ).
- 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)
.
bci()
(and its aliasbcai()
) to compute bias-corrected and accelerated bootstrap intervals. Along with this new function,ci()
anddescribe_posterior()
gain a newci_method
type,"bci"
.
contr.bayes
has been renamedcontr.orthonorm
to be more explicit about its function.
-
The default
ci
width has been changed to 0.95 instead of 0.89 (see here). This should not come as a surprise to the long-time users ofbayestestR
as we have been warning about this impending change for a while now :) -
Column names for
bayesfactor_restricted()
are nowp_prior
andp_posterior
(wasPrior_prob
andPosterior_prob
), to be consistent withbayesfactor_inclusion()
output. -
Removed the experimental function
mhdior
.
-
Support for
blavaan
models. -
Support for
blrm
models (rmsb). -
Support for
BGGM
models (BGGM). -
check_prior()
anddescribe_prior()
should now also work for more ways of prior definition in models from rstanarm or brms.
-
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()
.
-
Support for
bamlss
models. -
Roll-back R dependency to R >= 3.4.
- All
.stanreg
methods gain acomponent
argument, to also include auxiliary parameters.
-
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 ).
sexit()
, a function for sequential effect existence and significance testing (SEXIT).
-
Added startup-message to warn users that default ci-width might change in a future update.
-
Added support for mcmc.list objects.
-
unupdate()
gains anewdata
argument to work withbrmsfit_multiple
models. -
Fixed issue in Bayes factor vignette (don't evaluate code chunks if packages not available).
-
Added
as.matrix()
function forbayesfactor_model
arrays. -
unupdate()
, a utility function to get Bayesian models un-fitted from the data, representing the priors only.
ci()
supportsemmeans
- both Bayesian and frequentist ( #312 - cross fix withparameters
)
-
Fixed issue with default rope range for
BayesFactor
models. -
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()
forBayesFactor
models returns non-NA
values ( #343 )
mediation()
, to compute average direct and average causal mediation effects of multivariate response models (brmsfit
,stanmvreg
).
bayesfactor_parameters()
works withR<3.6.0
.
-
Preliminary support for stanfit objects.
-
Added support for bayesQR objects.
-
weighted_posteriors()
can now be used with data frames. -
Revised
print()
fordescribe_posterior()
. -
Improved value formatting for Bayesfactor functions.
-
Link transformation are now taken into account for
emmeans
objets. 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.
-
describe_posterior()
now also works oneffectsize::standardize_posteriors()
. -
p_significance()
now also works onparameters::simulate_model()
. -
rope_range()
supports more (frequentis) models.
-
Fixed issue with
plot()
data.frame
-methods ofp_direction()
andequivalence_test()
. -
Fix check issues for forthcoming insight-update.
- Support for bcplm objects (package cplm)
estimate_density()
now also works on grouped data frames.
-
Fixed bug in
weighted_posteriors()
to properly weight Intercept-onlyBFBayesFactor
models. -
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.
-
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()
getseffects
andcomponent
arguments 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
stanmvreg
models fordescribe_posterior()
,diagnostic_posterior()
anddescribe_prior()
.
-
point_estimate()
: argumentcentrality
default 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 )
-
Fixed mistake in description of
p_significance()
. -
Fixed error when computing BFs with
emmGrid
based 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.
-
convert_bayesian_to_frequentist()
Convert (refit) Bayesian model as frequentist -
distribution_binomial()
for perfect binomial distributions -
simulate_ttest()
Simulate data with a mean difference -
simulate_correlation()
Simulate correlated datasets -
p_significance()
Compute the probability of Practical Significance (ps) -
overlap()
Compute overlap between two empirical distributions -
estimate_density()
:method = "mixture"
argument added for mixture density estimation
- Fixed bug in
simulate_prior()
for stanreg-models whenautoscale
was set toFALSE
- revised
print()
-methods for functions likerope()
,p_direction()
,describe_posterior()
etc., in particular for model objects with random effects and/or zero-inflation component
-
check_prior()
to check if prior is informative -
simulate_prior()
to simulate model's priors as distributions -
distribution_gamma()
to generate a (near-perfect or random) Gamma distribution -
contr.bayes
function 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 functions -
Added support for
sim
,sim.merMod
(fromarm::sim()
) andMCMCglmm
-objects to many functions (likehdi()
,ci()
,eti()
,rope()
,p_direction()
,point_estimate()
, ...) -
describe_posterior()
gets aneffects
andcomponent
argument, 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
-
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
-
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 100 -
p_direction()
: returns a proportion (between 0.5 and 1) instead of a value between 50 and 100 (#168) -
bayesfactor_savagedickey()
:hypothesis
argument replaced bynull
as part of the newbayesfactor_parameters()
function
-
density_at()
,p_map()
andmap_estimate()
:method
argument added -
rope()
:ci_method
argument added -
eti()
: Computes equal-tailed intervals -
reshape_ci()
: Reshape CIs between wide/long -
bayesfactor_parameters()
: New function, replacingbayesfactor_savagedickey()
, allows for computing Bayes factors against a point-null or an interval-null -
bayesfactor_restricted()
: Function for computing Bayes factors for order restricted models
bayesfactor_inclusion()
now works withR < 3.6
.
-
equivalence_test()
: returns capitalized output (e.g.,Rejected
instead ofrejected
) -
describe_posterior.numeric()
:dispersion
defaults toFALSE
for consistency with the other methods
-
pd_to_p()
andp_to_pd()
: Functions to convert between probability of direction (pd) and p-value -
Support of
emmGrid
objects:ci()
,rope()
,bayesfactor_savagedickey()
,describe_posterior()
, ...
- Improved tutorial 2
-
describe_posterior()
: Fixed column order restoration -
bayesfactor_inclusion()
: Inclusion BFs for matched models are more inline with JASP results.
-
plotting functions now require the installation of the
see
package -
estimate
argument name indescribe_posterior()
andpoint_estimate()
changed tocentrality
-
hdi()
,ci()
,rope()
andequivalence_test()
defaultci
to0.89
-
rnorm_perfect()
deprecated in favour ofdistribution_normal()
-
map_estimate()
now returns a single value instead of a dataframe and thedensity
parameter has been removed. The MAP density value is now accessible viaattributes(map_output)$MAP_density
-
describe_posterior()
,describe_prior()
,diagnostic_posterior()
: added wrapper function -
point_estimate()
added function to compute point estimates -
p_direction()
: new argumentmethod
to compute pd based on AUC -
area_under_curve()
: compute AUC -
distribution()
functions have been added -
bayesfactor_savagedickey()
,bayesfactor_models()
andbayesfactor_inclusion()
functions has been added -
Started adding plotting methods (currently in the
see
package) forp_direction()
andhdi()
-
probability_at()
as alias fordensity_at()
-
effective_sample()
to return the effective sample size of Stan-models -
mcse()
to return the Monte Carlo standard error of Stan-models
-
Improved documentation
-
Improved testing
-
p_direction()
: improved printing -
rope()
for model-objects now returns the HDI values for all parameters as attribute in a consistent way -
Changes legend-labels in
plot.equivalence_test()
to align plots with the output of theprint()
-method (#78)
-
hdi()
returned multiple class attributes (#72) -
Printing results from
hdi()
failed whenci
-argument had fractional parts for percentage values (e.g.ci = 0.995
). -
plot.equivalence_test()
did not work properly for brms-models (#76).
-
CRAN initial publication and 0.1.0 release
-
Added a
NEWS.md
file to track changes to the package