The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.
reformulas package;
BayesTools now compiles a JAGS module (inverse-gamma, moment,
inverse-moment, and LKJ distributions) and requires JAGS 4.x (>=
4.3.0), including its headers and libraries for installation from
sourceBayesTools_refit_required
errorBayesTools_marglik objects
(still inheriting from "bridge"), and the model-averaging
functions accept only these; use JAGS_bridgesampling() or
bridgesampling_object(logml)dbt_invgamma on the parameter itself instead of a gamma
prior on inv_<parameter>transform_orthonormal argument
(use transform_factors) and the ineffective
seed argument of JAGS_extend(); pass the
arguments that followed them by namecheck_bool() rejects NA by default and
check_int() rejects infinite valuesadd_bounds, factor priors outside formulas need
prior_factor_levels(), formula random effects need
prior_random(), and mean-difference or orthonormal priors
on indicator-coded interaction terms (e.g., g:x in
~ g + g:x) and multiply_by on the intercept
prior or on a component of a mixture or spike-and-slab term prior (where
it was ignored) are rejected, and interaction priors that are not
invariant to the mean-difference or orthonormal basis of a factor
(anything but zero-mean normal and zero-spike priors, or symmetric
priors for two-level factors) are rejectedJAGS_evaluate_formula(),
transform_scale_samples(), and original-scale
transformations require the formula design stored by
JAGS_fit(); attach it to draws without a fit with
JAGS_formula_draws()seed with R’s random-number
generator instead of seed + chain, and
mix_posteriors() allocates draws with multinomial counts,
so seeded results differ from 0.3.0; seeded functions restore the
caller’s random-number state instead of resetting itcontr.orthonormal() and contr.meandif()
return a closed-form (normalised Helmert) basis identical on every
platform, so raw orthonormal and mean-difference coefficients differ
from 0.3.0Savage_Dickey_BF() requires an exact, finite, and
nonzero prior ordinate at the null hypothesis (classed errors
otherwise), returns a finite Bayes factor when the null lies outside the
posterior draws, and returns NA with the reason for levels
with a posterior point mass at the nullJAGS_check_convergence() and autofit classify
parameters by their declared roles: constant parameters are structural,
sampled parameters with constant draws fail unless
allow_not_assessable = TRUE, and indicators are identified
from their priors rather than their namesterm{j}, interaction cells and formula prefixes
are named consistently across tables, Bayes factor MC-error warnings
name parameters by their table labels, and individual weight-function
omegas in plots follow the order of summary tablesJAGS_fit() monitors point priorsposterior_metadata()); arithmetic drops the metadata,
values modified in place stop with
BayesTools_stale_metadata, and posterior plots take point
masses only from declared posterior atomsprior_random(),
random_block(), and related helpers, with lme4-like syntax
(independent, nested, and interacted grouping, factor random slopes,
where a mean-difference or orthonormal factor term is one exchangeable
unit with one SD) and diagonal, unstructured (LKJ prior),
compound-symmetry, AR(1), heterogeneous, and continuous-time AR(1)
covariance structuresrandom_variance_allocation()),
known group covariance kernels (random_group_covariance()),
external SD sources (random_sd_source()), spike-and-slab
and mixture priors on random-effect SDs and correlations, and
noncentered, centered, or mean-centered (hierarchically centered)
parameterizationsJAGS_predict_formula(); formula_target,
blocks, and new_levels in
JAGS_evaluate_formula()), marginal covariance helpers, and
exact marginalization of Gaussian random-effect blocks in
JAGS_bridgesampling()random_effects_summary and related filters) on the fitted
or original scale, with level-cell correlations and multiple
correlations (cor_total) of factor terms, and
random_effects_summary_posterior()RandomEffects vignette comparing BayesTools
formula random effects with lme4 and brmsprior_ordered() for ordered-factor priors that
split a total effect across level increments with fixed or Dirichlet
allocationsprior_factor_levels() for attaching factor
metadata to factor priorsselection_model() for specifying how random
effects and sampling errors enter selection models, and selection
helpers for downstream packagesparameter_catalog(),
parameter_catalog_resolve(),
parameter_draws(), parameter_labels(), and
parameter_mixed_posterior() for selecting, extracting, and
labelling model quantitiesJAGS_deterministic_nodes() and
JAGS_evaluate_deterministic() for the deterministic
quantities generated in JAGS models, and parameter_source()
for referencing existing JAGS nodesposterior_metadata(), metadata constructors, and
posterior_transform() for transforming posterior draws
together with their supports, atoms, and densitiesparameter_prior_density(),
prior_density_ordinate(), and
prior_ordinate_status() for exact prior densities and
ordinates of model quantities, including random-effect SDs, variance
allocations, and LKJ correlationshypothesis_BF() for point and region hypotheses
specified as expressions (including comparisons of factor levels), with
the hypothesis parser hypothesis_parse() and
hypothesis_linear_target()hypothesis_BF() also tests the quantities of a fitted
model by the names of its parameter cataloghypothesis_BF_model(),
hypothesis_provider(), and
register_hypothesis_density_backend() for downstream model
classes and density methodsdensity_method argument to
Savage_Dickey_BF(), plot_posterior(), and
plot_marginal() for posterior densities precomputed by
downstream packagesJAGS_formula_coefficient_transform() and
JAGS_formula_prior_density() for original-scale prior
densities of scaled formula coefficientsJAGS_formula_draws() for evaluating formulas on
draws without a fitruntime_setup, runtime_cache, and
worker_output to JAGS_fit() and
JAGS_extend(), jags_modules to
JAGS_fit(), and the parallel cluster helpers
JAGS_runtime_cluster() and
JAGS_runtime_cluster_stop()monitor and allow_not_assessable to
JAGS_check_convergence() and autofit_control,
with per-parameter convergence diagnosticsseed, repetitions,
method, cores, and nonfinite to
JAGS_bridgesampling(), and
JAGS_marglik_priors_rows() for row-wise prior
densitieson_failure to the model-averaging functions for
models whose marginal likelihood failedharrell_davis_quantile(); posterior PET-PEESE
bands use Harrell-Davis quantilesas_marginal_inference(compute_BF = FALSE)JAGS_estimates_table() uses
transform_scaled for both fixed and random effects;
original-scale rows that cannot be computed are reported as
NA with a noteJAGS_extend() recompiles the model from the stored
chain states, so repeated extensions and extensions of reloaded fits are
reproducible<1/10000)multiply_by productsmean() and var() of truncated normal
priors are computed analytically; numerical integration was wrong far in
the tails and for narrow truncations~ g + g:x and ~ f/x are derived from the
fitted design; formulas without an original-scale representation
stopmultiply_by scalingexpression() formula terms are included in
marginal-likelihood reconstructionlog(intercept) formulas in
marginal_posterior() and
as_mixed_posteriors(transform_scaled = TRUE)marginal_posterior() for intercept-only formulas,
predictors entering only through interactions, and model averages in
which a model omits a factor termg:x in ~ g + g:x)plot_posterior() bias prior overlays follow the full
conditioning of the samplesmarginal_estimates_table() reports Bayes factor
warnings of scalar parametersstan_estimates_table() handles matrix-valued
parametersJAGS_bridgesampling() stops on rank-deficient bridge
coordinates instead of returning a meaningless estimateJAGS_fit() resolves the JAGS executable once per
session (about 0.8 s faster per fit)JAGS_bridgesampling() compiles formula and prior
evaluators once per callas_mixed_posteriors(transform_scaled = TRUE) caches the
transformed prior densitiesBAYESTOOLS_VIGNETTE_REFIT=false to render
without fittingwaldo as a test dependency__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 specifiedformula_scale parameter in JAGS_formula() and
JAGS_fit() - improves MCMC sampling efficiency and
numerical stabilitytransform_scale_samples() function to transform
posterior samples back to original scale after standardizationtransform_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 priorstransform_scaled argument to
plot_posterior() for visualizing prior and posterior
distributions on the original (unscaled) scale when using formula-based
models with auto-scalingexp_lin transformation type for log-intercept
unscaling in density/plotting functions:
exp(a + b * log(x))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 computationrunjags_estimates_table():
remove_parameters = TRUE to remove all non-formula
parametersremove_formulas to remove all parameters from specific
formulaskeep_parameters to keep only specified parameterskeep_formulas to keep only parameters from specified
formulasbias 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 typeprobs argument to
runjags_estimates_table() and
runjags_estimates_empty_table() for custom quantiles
(default: c(0.025, 0.5, 0.975))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^2prior_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 priorsprior_phacking(), prior_bias(), calibration
helpers, and selection_backend_spec() for compiling active
step/p-hacking backend parametersrunjags_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 tablesomega
representationNA when the prior
assigns probability 0 or 1 to inclusion, while keeping finite-sample
bounds for posterior inclusion probabilities of 0 or 10 (instead of
only -1).is.wholenumber with NAs and
na.rm = TRUEJAGS_diagnostics functions now correctly handle factor
parameters nested within mixture priorsplot_posterior() function with spike and slab
priorsprior_mixture() and
prior_spike_and_slab()JAGS_formula() function now replaces removed missing
intercept with 0 (so the model matrix remains unchanged)silent = FALSE argument in the
JAGS_fit() function now fits the model non-silently
againexpression()
instead of a parameter, such objects can be use to create prior
distributions that depend on other parameters in JAGSJAGS_fit() function
to accept expressions that are appended as literal text to the generated
JAGS formulaJAGS_fit() function
to handle uncorrelated random effects via (x||y)
(lme4-like) notationJAGS_estimates_table not printing formula prefix when
only spike and slab priors are suppliedmax_extend option to autofit_control
argument in JAGS_fit() to limit the number of iterations
for the model extensionJAGS_diagnostics_density() plots for mixture
distributionsplot_posterior() for simple
as_mixed_posteriors objectsJAGS_evaluate_formula() for mixture and spike and slab
priors.fit_to_posterior()prior_mixture() function for creating a mixture
of prior distributionsas_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 outputinterpret2() function for another way of
creating textual summaries without the need of inference and samples
objectsrunjags_estimates_table() functionprior_informed() functionbridge_object() (fixes:
https://github.com/FBartos/BayesTools/issues/28)Na/NaN tests for check_ functions
(fixes: https://github.com/FBartos/BayesTools/issues/26)JAGS_extend()
functionautofit_control argument in
JAGS_fit(): "restarts" allows to restart model
initialization up to restarts times in case of failuremodel_summary_table() in case of
prior_none()contrast = "meandif" to the
prior_factor function which generates identical prior
distributions for difference between the grand mean and each factor
levelcontrast = "independent" to the
prior_factor function which generates independent identical
prior distributions for each factor levelremove_column function for removing columns from
BayesTools_table objects without breaking the attributes
etc…remove_parameters argument to
model_summary_table()point prior distribution as option to
prior_factor with "meandif" and
"orthonormal" contrastsmarginal_posterior() function which creates
marginal prior and posterior distributions (according to a model formula
specification)Savage_Dickey_BF() function to compute density
ratio Bayes factors based on marginal_posterior
objectsmarginal_inference() function to combine
information from marginal_posterior() and
Savage_Dickey_BF()marginal_estimates_table() function to summarize
marginal_inference() objectsplot_marginal() function to visualize
marginal_inference() objectscontrast = "meandif" is now the default setting for
prior_factor functiontransform_orthonormal argument in favor of
more general transform_factors argumentdummy contrast/factor attributes to
treatment for consistency
(https://github.com/FBartos/BayesTools/issues/23)check_bool(),
check_char(), check_real(),
check_int(), and check_list() do not throw
error if allow_NULL = TRUEstudent-t allowed as a prior distribution
nameJAGS_evaluate_formularunjags_estimates_table() function can now handle
factor transformationsplot_posterior function can now handle factor
transformationsrunjags_estimates_table() function via the
remove_parameters argumentrunjags_estimates_table() function can now remove
factor spike prior distributionsstan_estimates_summary() functionJAGS_marglik_parameters_formula functionrunjags_estimates_table functionensemble_summary_table and
ensemble_diagnostics_table function can create table
without model componentsJAGS_evaluate_formula for evaluating formulas based on
data and posterior samples (for creating predictions etc)JAGS_parameter_names for transforming formula names
into the JAGS syntaxplot_models implementation for factor predictorsformat_parameter_names for cleaning parameter names
from JAGSmean, sd, and var functions
now return the corresponding values for differences from the mean for
the orthonormal prior distributionsrunjags_summary_table function
(previous version crashed under other than default fit_JAGS
settings)runjags_summary_table functionplot_models functionadd_column function for extending
BayesTools_table objects without breaking the attributes
etc…BayesTools_table functions with with
formula_prefix argumentmultiply_by attribute passed with the
prior)plot_posterior (posterior is now plotted over the
prior)inclusion_BF to deal with
over/underflow (Issue #9)ensemble_inference_table() (Issue #11)ensemble_summary_table
(Issue #7)prior_informed function for creating informed prior
distributions based on the past psychological and medical researchprior.plot can’t plot “spike” with
plot_type == "ggplot" (Issue #6)MCMC error/SD print names in BayesTools tables (Issue
#8)JAGS_bridgesampling_posterior unable to add a parameter
via add_parametersinterpret function for creating textual summaries based
on inference and samples objectsplot_posterior fails with only mu & PET samples
(Issue #5)These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.