Learn R Programming

BayesERtools

BayesERtools provides a suite of tools that facilitate exposure-response analysis using Bayesian methods.

Installation

You can install the BayesERtools with:

# install.packages('BayesERtools') # Once on CRAN
devtools::install_github("genentech/BayesERtools") # development version

You also need latest version of rstanemax (>= 0.1.7) to use Emax model.

install.packages('rstanemax', repos = c(ppm = 'https://packagemanager.posit.co/cran/latest'))

Supported model types

Copy Link

Version

Install

install.packages('BayesERtools')

Monthly Downloads

634

Version

0.2.0

License

Apache License 2.0

Maintainer

Kenta Yoshida

Last Published

February 12th, 2025

Functions in BayesERtools (0.2.0)

edit_spec_coveff

Customize specifications for covariate effect simulations/visualizations
dev_ermod_emax_exp_sel

Exposure metrics selection for Emax models
ermod_exp_sel_method

S3 methods for the classes ermod_exp_sel
eval_ermod

Evaluate exposure-response model prediction performance
extract_coef_exp_ci

Extract credible interval of the exposure coefficient
extract_ersim

Extract elements from objects of the classes ersim_* and `ersim_med_qi_*``
print_coveff

Format the covariate effect simulation results for printing
plot_er

Plot ER model simulations
ermod_method

S3 methods for the classes ermod_*
loo

Efficient approximate leave-one-out cross-validation (LOO)
p_direction

Probability of Direction (pd)
plot_er_exp_sel

Plot exposure metric selection comparison
plot_er_gof

Default GOF plot for ER model
sim_coveff

Perform simulation of covariate effects for ER model
run_kfold_cv

Run k-fold cross-validation
extract_method

Extract elements from S3 objects
sim_er_new_exp_marg

Calculate marginal expected response for specified exposure values
sim_er

Simulate from ER model
plot_coveff

Visualize the covariate effects for ER model
plot_cov_sel

Plot variable selection performance
sim_er_new_exp

Simulate from ER model at specified exposure values
dev_ermod_bin_cov_sel

Perform covariate selection for linear ER model
dev_ermod_bin_exp_sel

Exposure metrics selection for linear ER models
BayesERtools-package

BayesERtools: Bayesian Exposure-Response Analysis Tools
as_draws

Transform to draws objects
dev_ermod_bin

Develop linear ER model for binary or continuous endpoint
dev_ermod_bin_cov_functions

Internal functions for developing an ER model with covariates for binary endpoint
ermod_cov_sel_method

S3 methods for the classes ermod_bin_cov_sel
build_spec_coveff

Build specifications for covariate effect simulation/visualization
dev_ermod_emax

Develop Emax model for continuous and binary endpoint
calc_ersim_med_qi

Calculate median and quantile intervals from ersim object
extract_ermod

Extract elements from an object of class ermod_*
d_sim_lin

Sample simulated data for exposure-response with continuous endpoint using linear model.
ersim_method

S3 methods for the classes ersim_* and ersim_med_qi_*
d_sim_binom_cov

Sample simulated data for exposure-response with binary endpoint.