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:
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')) |
Bug tracker:https://github.com/fbartos/bayestools/issues
- kitchen_rolls - Kitchen Rolls data from Wagenmakers et al. (2015) replication study.
Last updated 9 months agofrom:9d77cbd32e. Checks:OK: 7. Indexed: yes.
Target | Result | Date |
---|---|---|
Doc / Vignettes | OK | Oct 17 2024 |
R-4.5-win | OK | Oct 17 2024 |
R-4.5-linux | OK | Oct 17 2024 |
R-4.4-win | OK | Oct 17 2024 |
R-4.4-mac | OK | Oct 17 2024 |
R-4.3-win | OK | Oct 17 2024 |
R-4.3-mac | OK | Oct 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.Rmd
usingknitr::rmarkdown
on Oct 17 2024.Last update: 2022-06-16
Started: 2022-06-16
Comparison to other R packages
Rendered fromComparisonR.Rmd
usingknitr::rmarkdown
on Oct 17 2024.Last update: 2022-06-16
Started: 2022-04-02
Readme and manuals
Help Manual
Help page | Topics |
---|---|
Adds column to BayesTools table | add_column |
BayesTools | BayesTools-package BayesTools _PACKAGE |
Create BayesTools ensemble summary tables | BayesTools_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 tables | BayesTools_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' object | bridgesampling_object |
Check input | check_bool check_char check_input check_int check_list check_real |
Independent contrast matrix | contr.independent |
Mean difference contrast matrix | contr.meandif |
Orthornomal contrast matrix | contr.orthonormal |
Prior density | density.prior |
Compute posterior probabilities and inclusion Bayes factors | compute_inference ensemble_inference models_inference |
Format Bayes factor | format_BF |
Add prior object to a ggplot | geom_prior |
Add list of prior objects to a plot | geom_prior_list |
Compute inclusion Bayes factors | inclusion_BF |
Interpret ensemble inference and estimates | interpret |
Reports whether x is a a prior object | is.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' prior | JAGS_add_priors |
Compute marginal likelihood of a 'JAGS' model | JAGS_bridgesampling |
Prepare 'JAGS' posterior for 'bridgesampling' | JAGS_bridgesampling_posterior |
Check and list 'JAGS' fitting settings | JAGS_check_and_list JAGS_check_and_list_autofit_settings JAGS_check_and_list_fit_settings |
Assess convergence of a runjags model | JAGS_check_convergence |
Plot diagnostics of a 'JAGS' model | JAGS_diagnostics JAGS_diagnostics_autocorrelation JAGS_diagnostics_density JAGS_diagnostics_trace |
Evaluate JAGS formula using posterior samples | JAGS_evaluate_formula |
Fits a 'JAGS' model | JAGS_extend JAGS_fit |
Create JAGS formula syntax and data object | JAGS_formula |
Create initial values for 'JAGS' model | JAGS_get_inits |
Extract parameters for 'JAGS' priors | JAGS_marglik_parameters JAGS_marglik_parameters_formula |
Compute marginal likelihood for 'JAGS' priors | JAGS_marglik_priors JAGS_marglik_priors_formula |
Create list of monitored parameters for 'JAGS' model | JAGS_to_monitor |
Kitchen Rolls data from Wagenmakers et al. (2015) replication study. | kitchen_rolls |
Add list of prior objects to a plot | lines_prior_list |
Add prior object to a plot | lines.prior |
Model-average marginal posterior distributions and marginal Bayes factors | marginal_inference |
Model-average marginal posterior distributions | marginal_posterior |
Prior mean | mean.prior |
Model-average posterior distributions | mix_posteriors |
Multivariate point mass distribution | dmpoint mpoint pmpoint qmpoint rmpoint |
Clean parameter names from JAGS | format_parameter_names JAGS_parameter_names parameter_names |
Plot samples from the marginal posterior distributions | plot_marginal |
Plot estimates from models | plot_models |
Plot samples from the mixed posterior distributions | plot_posterior |
Plot a list of prior distributions | plot_prior_list |
Plots a prior object | plot.prior |
Point mass distribution | dpoint point ppoint qpoint rpoint |
Print a BayesTools table | print.BayesTools_table |
Prints a prior object | print.prior |
Creates a prior distribution | prior prior_none |
Creates a prior distribution for factors | prior_factor |
Elementary prior related functions | ccdf.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 functions | ccdf cdf lpdf mccdf mcdf mlpdf mpdf mquant pdf prior_functions_methods quant rng |
Creates an informed prior distribution based on research | prior_informed |
Names of medical subfields from the Cochrane database of systematic reviews | prior_informed_medicine_names |
Creates a prior distribution for PET or PEESE models | prior_PEESE prior_PET prior_PP |
Creates a spike and slab prior distribution | prior_spike_and_slab |
Creates a prior distribution for a weight function | prior_weightfunction |
Prior range | range.prior |
Removes column to BayesTools table | remove_column |
Compute Savage-Dickey inclusion Bayes factors | Savage_Dickey_BF |
Creates generic for sd function | sd |
Prior sd | sd.prior |
Transform factor posterior samples into differences from the mean | transform_factor_samples |
Transform meandif posterior samples into differences from the mean | transform_meandif_samples |
Transform orthonomal posterior samples into differences from the mean | transform_orthonormal_samples |
Creates generic for var function | var |
Prior var | var.prior |
Weight functions | mdone.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 weightfunctions | weightfunctions_mapping |