The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
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[@]metanet.ch.
bayesDiagnostics provides comprehensive tools for
Bayesian model diagnostics and comparison, addressing critical gaps in
existing Bayesian diagnostic tools.
Install from GitHub:
devtools::install_github("ikrakib/bayesDiagnostics")Once available on CRAN:
install.packages("bayesDiagnostics")library(bayesDiagnostics)
library(brms)
# Fit Bayesian model
fit <- brm(mpg ~ hp + wt, data = mtcars)
# Conduct prior sensitivity analysis
result <- prior_sensitivity(
model = fit,
parameters = c("b_hp", "b_wt"),
prior_grid = list(
weak = prior(normal(0, 10), class = b),
strong = prior(normal(0, 1), class = b)
)
)
print(result)
plot(result)prior_sensitivity() - Compare posteriors across
priorsprior_predictive_check() - Validate prior
specificationsprior_robustness() - Test prior hyperparameter
sensitivityprior_elicitation_helper() - Match expert beliefs to
distributionsautomated_ppc() - Comprehensive PPC batteryppc_crossvalidation() - K-fold CV with PPCsgraphical_ppc() - Bayesplot-based visualizationsbayesian_p_values() - Test statistics for model
checkingmodel_comparison_suite() - Multi-method comparisonbayes_factor_comparison() - Bridge sampling for Bayes
factorspredictive_performance() - Out-of-sample
assessmenthierarchical_convergence() - Hierarchical model
diagnosticseffective_sample_size_diagnostics() - ESS
assessmentexpert_prior_elicitation() - Interactive prior
elicitationprior_simulation() - Simulate from priorFor detailed documentation, see the package vignettes:
vignette("bayesDiagnostics")Contributions welcome! Please:
citation("bayesDiagnostics")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.