Skip to content

Releases: FBartos/BayesTools

BayesTools 0.3.0

Choose a tag to compare

@FBartos FBartos released this 06 May 12:51

Features

  • major refactoring and speed-up of unit tests
  • adds support for __default_factor and __default_continuous priors in JAGS_formula() - when specified in the prior_list, these are used as default priors for factor and continuous predictors that are not explicitly specified
  • adds automatic standardization of continuous predictors via formula_scale parameter in JAGS_formula() and JAGS_fit() - improves MCMC sampling efficiency and numerical stability
  • adds transform_scale_samples() function to transform posterior samples back to original scale after standardization
  • adds transform_prior_samples() function to generate and transform prior samples using the same matrix transformation as posterior samples - enables correct visualization of priors on the original (unscaled) predictor scale, including proper handling of the intercept which depends on multiple coefficient priors
  • adds transform_scaled argument to plot_posterior() for visualizing prior and posterior distributions on the original (unscaled) scale when using formula-based models with auto-scaling
  • adds exp_lin transformation type for log-intercept unscaling in density/plotting functions: exp(a + b * log(x))
  • adds log(intercept) formula attribute for specifying models of the form log(intercept) + sum(beta_i * x_i) - useful for parameters that must be positive (e.g., standard deviation) while keeping the intercept on the original scale. Set via attr(formula, "log(intercept)") <- TRUE. Supported in JAGS_formula(), JAGS_evaluate_formula(), and marginal likelihood computation
  • adds advanced parameter filtering options to runjags_estimates_table():
    • remove_parameters = TRUE to remove all non-formula parameters
    • remove_formulas to remove all parameters from specific formulas
    • keep_parameters to keep only specified parameters
    • keep_formulas to keep only parameters from specified formulas
    • when bias is specified in remove_parameters or keep_parameters, the corresponding bias-related parameters (PET, PEESE, omega, alpha, pi_null, and phack_kind) are automatically included based on the bias prior type
  • adds probs argument to runjags_estimates_table() and runjags_estimates_empty_table() for custom quantiles (default: c(0.025, 0.5, 0.975))
  • adds effect_direction argument to plot_posterior(), plot_prior_list(), lines_prior_list(), and geom_prior_list() for PET-PEESE regression plots - use "positive" (default) for mu + PET*se + PEESE*se^2 or "negative" for mu - PET*se - PEESE*se^2
  • redesigns prior_weightfunction() around a unified side, steps, and weights specification, with wf_cumulative(), wf_fixed(), and wf_independent() constructors for cumulative Dirichlet, fixed, independent, and log-independent weightfunction priors
  • adds p-hacking and composed selection-bias priors via prior_phacking(), prior_bias(), calibration helpers, and selection_backend_spec() for compiling active step/p-hacking backend parameters
  • adds error % for inclusion BF calculation

Changes

  • changes quantile column names in runjags_estimates_table() and stan_estimates_table() from lCI/Median/uCI to numeric values (e.g., 0.025/0.5/0.975) for consistency with ensemble summary tables
  • implied prior distributions for estimated marginal means, unstandardized coefficients, and PET-PEESE no longer require prior samples
  • implied prior distributions for weightfunction weights now use analytical forms for cumulative Dirichlet, fixed, independent, and log-independent priors, including mixture and model-averaged weightfunctions where possible
  • independent weightfunction priors now allow non-reference weights above one via non-negative omega-scale priors or unrestricted log-omega priors
  • replaces the legacy dot-named weightfunction prior specifications with the unified weightfunction prior API and updates JAGS generation, marginal likelihood computation, posterior extraction, diagnostics, and summary tables to use the new component-local omega representation
  • composed selection-bias priors and publication-bias mixtures now support prior sampling and explicit unsupported-operation errors for ambiguous scalar prior generics

Fixes

  • reports inclusion Bayes factors as NA when the prior assigns probability 0 or 1 to inclusion, while keeping finite-sample bounds for posterior inclusion probabilities of 0 or 1
  • fixes incorrect ordering the printed mixture priors
  • fixes formula with no intercepts coded as 0 (instead of only -1)
  • fixes bug in .is.wholenumber with NAs and na.rm = TRUE
  • fixes ggplot prior spike layers for marginal factor plots with density and point components

BayesTools 0.2.23

Choose a tag to compare

@FBartos FBartos released this 08 Dec 20:10

Fixes

  • JAGS_diagnostics functions now correctly handle factor parameters nested within mixture priors

BayesTools 0.2.22

Choose a tag to compare

@FBartos FBartos released this 08 Dec 20:10

version 0.2.22

Fixes

  • plot_posterior() function with spike and slab priors

BayesTools 0.2.21

Choose a tag to compare

@FBartos FBartos released this 29 Aug 08:59

Fixes

  • JAGS_formula() function now replaces removed missing intercept with 0 (so the model matrix remains unchanged)
  • resetting silent = FALSE argument in the JAGS_fit() function now fits the model non-silently again

BayesTools 0.2.20

Choose a tag to compare

@FBartos FBartos released this 30 Jul 10:39

Features

  • extending prior functions to accept expression() instead of a parameter, such objects can be use to create prior distributions that depend on other parameters in JAGS
  • extending the formula interface of JAGS_fit() function to accept expressions that are appended as literal text to the generated JAGS formula
  • extending the formula interface of JAGS_fit() function to handle uncorrelated random effects via (x||y) (lme4-like) notation

Fixes

  • JAGS_estimates_table not printing formula prefix when only spike and slab priors are supplied

BayesTools 0.2.19

Choose a tag to compare

@FBartos FBartos released this 08 Jun 17:22

Features

  • adds max_extend option to autofit_control argument in JAGS_fit() to limit the number of iterations for the model extension
  • adds JASP progress bar integration

Fixes

  • JAGS_diagnostics_density() plots for mixture distributions
  • prior and posterior plot_posterior() for simple as_mixed_posteriors objects
  • JAGS_evaluate_formula() for mixture and spike and slab priors
  • set Bayes factors based on alternative only prior distributions to NA
  • better handling of posterior samples in .fit_to_posterior()

BayesTools 0.2.18

Choose a tag to compare

@FBartos FBartos released this 16 Jan 21:07

Features

  • adding prior_mixture() function for creating a mixture of prior distributions
  • adding as_mixed_posteriors() and as_marginal_inference() functions for a single JAGS models (with spike and slab or mixture priors) to enabling tables and figures based on the corresponding output
  • adding interpret2() function for another way of creating textual summaries without the need of inference and samples objects
  • speedup and improvements to the runjags_estimates_table() function

Fixes

  • small fixes for expansion of the RoBMA functionality

BayesTools 0.2.17

Choose a tag to compare

@FBartos FBartos released this 20 Feb 13:59

Features

  • adding informed prior distributions for dichotomous and time-to-event outcomes based on Cochrane Database of Systematic Reviews to prior_informed() function
  • adding bridge object convenience function bridge_object() (fixes: #28)
  • adding Na/NaN tests for check_ functions (fixes: #26)

Fixes

  • ability to run more than 4 chains (fixes: #20)

BayesTools 0.2.16

Choose a tag to compare

@FBartos FBartos released this 11 Jul 13:18

Features

  • update an existing JAGS fit with JAGS_extend() function
  • new element of the autofit_control argument in JAGS_fit(): "restarts" allows to restart model initialization up to restarts times in case of failure

BayesTools 0.2.15

Choose a tag to compare

@FBartos FBartos released this 23 Jun 08:09

Fixes

  • fixing repeated print of previous prior distribution in model_summary_table() in case of prior_none()