Package: BayesTools 0.2.17

BayesTools: Tools for Bayesian Analyses

Provides tools for conducting Bayesian analyses and Bayesian model averaging (Kass and Raftery, 1995, <doi:10.1080/01621459.1995.10476572>, Hoeting et al., 1999, <doi:10.1214/ss/1009212519>). The package contains functions for creating a wide range of prior distribution objects, mixing posterior samples from 'JAGS' and 'Stan' models, plotting posterior distributions, and etc... The tools for working with prior distribution span from visualization, generating 'JAGS' and 'bridgesampling' syntax to basic functions such as rng, quantile, and distribution functions.

Authors:František Bartoš [aut, cre]

BayesTools_0.2.17.tar.gz
BayesTools_0.2.17.zip(r-4.5)BayesTools_0.2.17.zip(r-4.4)BayesTools_0.2.17.zip(r-4.3)
BayesTools_0.2.17.tgz(r-4.4-any)BayesTools_0.2.17.tgz(r-4.3-any)
BayesTools_0.2.17.tar.gz(r-4.5-noble)BayesTools_0.2.17.tar.gz(r-4.4-noble)
BayesTools_0.2.17.tgz(r-4.4-emscripten)BayesTools_0.2.17.tgz(r-4.3-emscripten)
BayesTools.pdf |BayesTools.html
BayesTools/json (API)
NEWS

# Install 'BayesTools' in R:
install.packages('BayesTools', repos = c('https://fbartos.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/fbartos/bayestools/issues

Datasets:
  • kitchen_rolls - Kitchen Rolls data from Wagenmakers et al. (2015) replication study.

On CRAN:

bayesianmodel-averaging

5.96 score 7 stars 3 packages 14 scripts 1.0k downloads 136 exports 38 dependencies

Last updated 9 months agofrom:9d77cbd32e. Checks:OK: 7. Indexed: yes.

TargetResultDate
Doc / VignettesOKOct 17 2024
R-4.5-winOKOct 17 2024
R-4.5-linuxOKOct 17 2024
R-4.4-winOKOct 17 2024
R-4.4-macOKOct 17 2024
R-4.3-winOKOct 17 2024
R-4.3-macOKOct 17 2024

Exports:add_columnbridgesampling_objectccdfcdfcheck_boolcheck_charcheck_intcheck_listcheck_realcompute_inferencecontr.independentcontr.meandifcontr.orthonormaldmpointdpointensemble_diagnostics_empty_tableensemble_diagnostics_tableensemble_estimates_empty_tableensemble_estimates_tableensemble_inferenceensemble_inference_empty_tableensemble_inference_tableensemble_summary_empty_tableensemble_summary_tableformat_BFformat_parameter_namesgeom_priorgeom_prior_listinclusion_BFinterpretis.prioris.prior.discreteis.prior.factoris.prior.independentis.prior.meandifis.prior.noneis.prior.orthonormalis.prior.PEESEis.prior.PETis.prior.pointis.prior.simpleis.prior.spike_and_slabis.prior.treatmentis.prior.vectoris.prior.weightfunctionJAGS_add_priorsJAGS_bridgesamplingJAGS_bridgesampling_posteriorJAGS_check_and_list_autofit_settingsJAGS_check_and_list_fit_settingsJAGS_check_convergenceJAGS_diagnosticsJAGS_diagnostics_autocorrelationJAGS_diagnostics_densityJAGS_diagnostics_traceJAGS_estimates_empty_tableJAGS_estimates_tableJAGS_evaluate_formulaJAGS_extendJAGS_fitJAGS_formulaJAGS_get_initsJAGS_inference_empty_tableJAGS_inference_tableJAGS_marglik_parametersJAGS_marglik_parameters_formulaJAGS_marglik_priorsJAGS_marglik_priors_formulaJAGS_parameter_namesJAGS_summary_tableJAGS_to_monitorlines_prior_listlpdfmarginal_estimates_tablemarginal_inferencemarginal_posteriormccdfmcdfmdone.sidedmdone.sided_fixedmdtwo.sidedmdtwo.sided_fixedmix_posteriorsmlpdfmodel_summary_empty_tablemodel_summary_tablemodels_inferencempdfmpone.sidedmpone.sided_fixedmptwo.sidedmptwo.sided_fixedmqone.sidedmqone.sided_fixedmqtwo.sidedmqtwo.sided_fixedmquantpdfplot_marginalplot_modelsplot_posteriorplot_prior_listpmpointppointpriorprior_factorprior_informedprior_informed_medicine_namesprior_noneprior_PEESEprior_PETprior_spike_and_slabprior_weightfunctionqmpointqpointquantremove_columnrmpointrngrone.sidedrone.sided_fixedrpointrtwo.sidedrtwo.sided_fixedrunjags_estimates_empty_tablerunjags_estimates_tablerunjags_inference_empty_tablerunjags_inference_tableSavage_Dickey_BFsdstan_estimates_tabletransform_factor_samplestransform_meandif_samplestransform_orthonormal_samplesvarweightfunctions_mapping

Dependencies:bridgesamplingBrobdingnagclicodacolorspaceextraDistrfansifarverggplot2gluegtableisobandlabelinglatticelifecyclemagrittrMASSMatrixmgcvmunsellmvtnormnlmepillarpkgconfigR6rbibutilsRColorBrewerRcppRdpackrlangscalesstringistringrtibbleutf8vctrsviridisLitewithr

Bayes factors via spike and slab prior vs. bridge sampling

Rendered fromSpikeAndSlab.Rmdusingknitr::rmarkdownon Oct 17 2024.

Last update: 2022-06-16
Started: 2022-06-16

Comparison to other R packages

Rendered fromComparisonR.Rmdusingknitr::rmarkdownon Oct 17 2024.

Last update: 2022-06-16
Started: 2022-04-02

Readme and manuals

Help Manual

Help pageTopics
Adds column to BayesTools tableadd_column
BayesToolsBayesTools-package BayesTools _PACKAGE
Create BayesTools ensemble summary tablesBayesTools_ensemble_tables ensemble_diagnostics_empty_table ensemble_diagnostics_table ensemble_estimates_empty_table ensemble_estimates_table ensemble_inference_empty_table ensemble_inference_table ensemble_summary_empty_table ensemble_summary_table marginal_estimates_table
Create BayesTools model tablesBayesTools_model_tables JAGS_estimates_empty_table JAGS_estimates_table JAGS_inference_empty_table JAGS_inference_table JAGS_summary_table model_summary_empty_table model_summary_table runjags_estimates_empty_table runjags_estimates_table runjags_inference_empty_table runjags_inference_table stan_estimates_table
Create a 'bridgesampling' objectbridgesampling_object
Check inputcheck_bool check_char check_input check_int check_list check_real
Independent contrast matrixcontr.independent
Mean difference contrast matrixcontr.meandif
Orthornomal contrast matrixcontr.orthonormal
Prior densitydensity.prior
Compute posterior probabilities and inclusion Bayes factorscompute_inference ensemble_inference models_inference
Format Bayes factorformat_BF
Add prior object to a ggplotgeom_prior
Add list of prior objects to a plotgeom_prior_list
Compute inclusion Bayes factorsinclusion_BF
Interpret ensemble inference and estimatesinterpret
Reports whether x is a a prior objectis.prior is.prior.discrete is.prior.factor is.prior.independent is.prior.meandif is.prior.none is.prior.orthonormal is.prior.PEESE is.prior.PET is.prior.point is.prior.simple is.prior.spike_and_slab is.prior.treatment is.prior.vector is.prior.weightfunction
Add 'JAGS' priorJAGS_add_priors
Compute marginal likelihood of a 'JAGS' modelJAGS_bridgesampling
Prepare 'JAGS' posterior for 'bridgesampling'JAGS_bridgesampling_posterior
Check and list 'JAGS' fitting settingsJAGS_check_and_list JAGS_check_and_list_autofit_settings JAGS_check_and_list_fit_settings
Assess convergence of a runjags modelJAGS_check_convergence
Plot diagnostics of a 'JAGS' modelJAGS_diagnostics JAGS_diagnostics_autocorrelation JAGS_diagnostics_density JAGS_diagnostics_trace
Evaluate JAGS formula using posterior samplesJAGS_evaluate_formula
Fits a 'JAGS' modelJAGS_extend JAGS_fit
Create JAGS formula syntax and data objectJAGS_formula
Create initial values for 'JAGS' modelJAGS_get_inits
Extract parameters for 'JAGS' priorsJAGS_marglik_parameters JAGS_marglik_parameters_formula
Compute marginal likelihood for 'JAGS' priorsJAGS_marglik_priors JAGS_marglik_priors_formula
Create list of monitored parameters for 'JAGS' modelJAGS_to_monitor
Kitchen Rolls data from Wagenmakers et al. (2015) replication study.kitchen_rolls
Add list of prior objects to a plotlines_prior_list
Add prior object to a plotlines.prior
Model-average marginal posterior distributions and marginal Bayes factorsmarginal_inference
Model-average marginal posterior distributionsmarginal_posterior
Prior meanmean.prior
Model-average posterior distributionsmix_posteriors
Multivariate point mass distributiondmpoint mpoint pmpoint qmpoint rmpoint
Clean parameter names from JAGSformat_parameter_names JAGS_parameter_names parameter_names
Plot samples from the marginal posterior distributionsplot_marginal
Plot estimates from modelsplot_models
Plot samples from the mixed posterior distributionsplot_posterior
Plot a list of prior distributionsplot_prior_list
Plots a prior objectplot.prior
Point mass distributiondpoint point ppoint qpoint rpoint
Print a BayesTools tableprint.BayesTools_table
Prints a prior objectprint.prior
Creates a prior distributionprior prior_none
Creates a prior distribution for factorsprior_factor
Elementary prior related functionsccdf.prior cdf.prior lpdf.prior mccdf.prior mcdf.prior mlpdf.prior mpdf.prior mquant.prior pdf.prior prior_functions quant.prior rng.prior
Creates generics for common statistical functionsccdf cdf lpdf mccdf mcdf mlpdf mpdf mquant pdf prior_functions_methods quant rng
Creates an informed prior distribution based on researchprior_informed
Names of medical subfields from the Cochrane database of systematic reviewsprior_informed_medicine_names
Creates a prior distribution for PET or PEESE modelsprior_PEESE prior_PET prior_PP
Creates a spike and slab prior distributionprior_spike_and_slab
Creates a prior distribution for a weight functionprior_weightfunction
Prior rangerange.prior
Removes column to BayesTools tableremove_column
Compute Savage-Dickey inclusion Bayes factorsSavage_Dickey_BF
Creates generic for sd functionsd
Prior sdsd.prior
Transform factor posterior samples into differences from the meantransform_factor_samples
Transform meandif posterior samples into differences from the meantransform_meandif_samples
Transform orthonomal posterior samples into differences from the meantransform_orthonormal_samples
Creates generic for var functionvar
Prior varvar.prior
Weight functionsmdone.sided mdone.sided_fixed mdtwo.sided mdtwo.sided_fixed mpone.sided mpone.sided_fixed mptwo.sided mptwo.sided_fixed mqone.sided mqone.sided_fixed mqtwo.sided mqtwo.sided_fixed rone.sided rone.sided_fixed rtwo.sided rtwo.sided_fixed weightfunctions
Create coefficient mapping between multiple weightfunctionsweightfunctions_mapping