BayesERtools
Bayesian Exposure-Response Analysis Tools
v0.2.6
·
Jun 12, 2026
·
Apache License 2.0
Description
Suite of tools that facilitate exposure-response analysis using Bayesian methods. The package provides a streamlined workflow for fitting types of models that are commonly used in exposure-response analysis - linear and Emax for continuous endpoints, logistic linear and logistic Emax for binary endpoints, as well as performing simulation and visualization. Learn more about the workflow at <https://genentech.github.io/BayesERbook/>.
Downloads
CRAN
627
Last 30 days
5186th
2.1K
Last 90 days
8K
Last year
Trend: -9.8% (30d vs prior 30d)
r2u
CRAN
15
Last 30 days
40
Last 90 days
209
Last year
Trend: -34.8% (30d vs prior 30d)
CRAN Check Status
6
ERROR
7
OK
Show all 13 flavors
| Flavor | Status |
|---|---|
| r-devel-linux-x86_64-debian-clang | OK |
| r-devel-linux-x86_64-debian-gcc | ERROR |
| r-devel-linux-x86_64-fedora-clang | ERROR |
| r-devel-linux-x86_64-fedora-gcc | ERROR |
| r-devel-windows-x86_64 | ERROR |
| r-oldrel-macos-arm64 | OK |
| r-oldrel-macos-x86_64 | OK |
| r-oldrel-windows-x86_64 | ERROR |
| r-patched-linux-x86_64 | OK |
| r-release-linux-x86_64 | ERROR |
| r-release-macos-arm64 | OK |
| r-release-macos-x86_64 | OK |
| r-release-windows-x86_64 | OK |
Check details (6 non-OK)
ERROR
r-devel-linux-x86_64-debian-gcc
tests
Running ‘testthat.R’ [112s/143s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> # This file is part of the standard setup for testthat.
> # It is recommended that you do not modify it.
> #
> # Where should you do additional test configuration?
> # Learn more about the roles of various files in:
> # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
> # * https://testthat.r-lib.org/articles/special-files.html
>
> library(testthat)
> library(BayesERtools)
>
> test_check("BayesERtools")
Loading required namespace: projpred
Saving _problems/test-dev_ermod_lin-229.R
Diagnostic flags present.
See ?`loo-glossary` (sections `diag_diff` and `diag_elpd`)
or https://mc-stan.org/loo/reference/loo-glossary.html.
Loading required package: bayestestR
[ FAIL 4 | WARN 0 | SKIP 0 | PASS 209 ]
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-dev_ermod_emax.R:150:5'): plot_e
...[truncated]...
`.
Caused by error in `dplyr::all_of()`:
! Can't subset elements that don't exist.
x Elements `1` and `2` don't exist.
── Error ('test-dev_ermod_lin.R:229:5'): Exposure metrics selection ────────────
Error in `tidyr::pivot_longer(extract_data(x), dplyr::all_of(var_exp_order), names_to = ".exp_metric", values_to = ".exposure")`: i In argument: `dplyr::all_of(var_exp_order)`.
Caused by error in `dplyr::all_of()`:
! Can't subset elements that don't exist.
x Elements `1`, `2`, and `3` don't exist.
── Error ('test-dev_ermod_lin.R:427:5'): plot.ermod_exp_sel calls plot_er_exp_sel ──
Error in `tidyr::pivot_longer(extract_data(x), dplyr::all_of(var_exp_order), names_to = ".exp_metric", values_to = ".exposure")`: i In argument: `dplyr::all_of(var_exp_order)`.
Caused by error in `dplyr::all_of()`:
! Can't subset elements that don't exist.
x Elements `1`, `2`, and `3` don't exist.
[ FAIL 4 | WARN 0 | SKIP 0 | PASS 209 ]
Error:
! Test failures.
Execution halted
ERROR
r-devel-linux-x86_64-fedora-clang
tests
Running ‘testthat.R’ [291s/379s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> # This file is part of the standard setup for testthat.
> # It is recommended that you do not modify it.
> #
> # Where should you do additional test configuration?
> # Learn more about the roles of various files in:
> # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
> # * https://testthat.r-lib.org/articles/special-files.html
>
> library(testthat)
> library(BayesERtools)
>
> test_check("BayesERtools")
Loading required namespace: projpred
Saving _problems/test-dev_ermod_lin-229.R
Diagnostic flags present.
See ?`loo-glossary` (sections `diag_diff` and `diag_elpd`)
or https://mc-stan.org/loo/reference/loo-glossary.html.
Loading required package: bayestestR
[ FAIL 4 | WARN 0 | SKIP 0 | PASS 209 ]
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-dev_ermod_emax.R:150:5'): plot_e
...[truncated]...
`.
Caused by error in `dplyr::all_of()`:
! Can't subset elements that don't exist.
x Elements `1` and `2` don't exist.
── Error ('test-dev_ermod_lin.R:229:5'): Exposure metrics selection ────────────
Error in `tidyr::pivot_longer(extract_data(x), dplyr::all_of(var_exp_order), names_to = ".exp_metric", values_to = ".exposure")`: i In argument: `dplyr::all_of(var_exp_order)`.
Caused by error in `dplyr::all_of()`:
! Can't subset elements that don't exist.
x Elements `1`, `2`, and `3` don't exist.
── Error ('test-dev_ermod_lin.R:427:5'): plot.ermod_exp_sel calls plot_er_exp_sel ──
Error in `tidyr::pivot_longer(extract_data(x), dplyr::all_of(var_exp_order), names_to = ".exp_metric", values_to = ".exposure")`: i In argument: `dplyr::all_of(var_exp_order)`.
Caused by error in `dplyr::all_of()`:
! Can't subset elements that don't exist.
x Elements `1`, `2`, and `3` don't exist.
[ FAIL 4 | WARN 0 | SKIP 0 | PASS 209 ]
Error:
! Test failures.
Execution halted
ERROR
r-devel-linux-x86_64-fedora-gcc
tests
Running ‘testthat.R’ [307s/396s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> # This file is part of the standard setup for testthat.
> # It is recommended that you do not modify it.
> #
> # Where should you do additional test configuration?
> # Learn more about the roles of various files in:
> # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
> # * https://testthat.r-lib.org/articles/special-files.html
>
> library(testthat)
> library(BayesERtools)
>
> test_check("BayesERtools")
Loading required namespace: projpred
Saving _problems/test-dev_ermod_lin-229.R
Diagnostic flags present.
See ?`loo-glossary` (sections `diag_diff` and `diag_elpd`)
or https://mc-stan.org/loo/reference/loo-glossary.html.
Loading required package: bayestestR
[ FAIL 4 | WARN 0 | SKIP 0 | PASS 209 ]
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-dev_ermod_emax.R:150:5'): plot_e
...[truncated]...
`.
Caused by error in `dplyr::all_of()`:
! Can't subset elements that don't exist.
x Elements `1` and `2` don't exist.
── Error ('test-dev_ermod_lin.R:229:5'): Exposure metrics selection ────────────
Error in `tidyr::pivot_longer(extract_data(x), dplyr::all_of(var_exp_order), names_to = ".exp_metric", values_to = ".exposure")`: i In argument: `dplyr::all_of(var_exp_order)`.
Caused by error in `dplyr::all_of()`:
! Can't subset elements that don't exist.
x Elements `1`, `2`, and `3` don't exist.
── Error ('test-dev_ermod_lin.R:427:5'): plot.ermod_exp_sel calls plot_er_exp_sel ──
Error in `tidyr::pivot_longer(extract_data(x), dplyr::all_of(var_exp_order), names_to = ".exp_metric", values_to = ".exposure")`: i In argument: `dplyr::all_of(var_exp_order)`.
Caused by error in `dplyr::all_of()`:
! Can't subset elements that don't exist.
x Elements `1`, `2`, and `3` don't exist.
[ FAIL 4 | WARN 0 | SKIP 0 | PASS 209 ]
Error:
! Test failures.
Execution halted
ERROR
r-devel-windows-x86_64
tests
Running 'testthat.R' [181s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
> # This file is part of the standard setup for testthat.
> # It is recommended that you do not modify it.
> #
> # Where should you do additional test configuration?
> # Learn more about the roles of various files in:
> # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
> # * https://testthat.r-lib.org/articles/special-files.html
>
> library(testthat)
> library(BayesERtools)
>
> test_check("BayesERtools")
Loading required namespace: projpred
Saving _problems/test-dev_ermod_lin-229.R
Diagnostic flags present.
See ?`loo-glossary` (sections `diag_diff` and `diag_elpd`)
or https://mc-stan.org/loo/reference/loo-glossary.html.
Loading required package: bayestestR
[ FAIL 4 | WARN 0 | SKIP 0 | PASS 209 ]
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-dev_ermod_emax.R:150:5'): plot_ermod
...[truncated]...
`.
Caused by error in `dplyr::all_of()`:
! Can't subset elements that don't exist.
x Elements `1` and `2` don't exist.
── Error ('test-dev_ermod_lin.R:229:5'): Exposure metrics selection ────────────
Error in `tidyr::pivot_longer(extract_data(x), dplyr::all_of(var_exp_order), names_to = ".exp_metric", values_to = ".exposure")`: i In argument: `dplyr::all_of(var_exp_order)`.
Caused by error in `dplyr::all_of()`:
! Can't subset elements that don't exist.
x Elements `1`, `2`, and `3` don't exist.
── Error ('test-dev_ermod_lin.R:427:5'): plot.ermod_exp_sel calls plot_er_exp_sel ──
Error in `tidyr::pivot_longer(extract_data(x), dplyr::all_of(var_exp_order), names_to = ".exp_metric", values_to = ".exposure")`: i In argument: `dplyr::all_of(var_exp_order)`.
Caused by error in `dplyr::all_of()`:
! Can't subset elements that don't exist.
x Elements `1`, `2`, and `3` don't exist.
[ FAIL 4 | WARN 0 | SKIP 0 | PASS 209 ]
Error:
! Test failures.
Execution halted
ERROR
r-oldrel-windows-x86_64
tests
Running 'testthat.R' [242s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
> # This file is part of the standard setup for testthat.
> # It is recommended that you do not modify it.
> #
> # Where should you do additional test configuration?
> # Learn more about the roles of various files in:
> # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
> # * https://testthat.r-lib.org/articles/special-files.html
>
> library(testthat)
> library(BayesERtools)
>
> test_check("BayesERtools")
Loading required namespace: projpred
Saving _problems/test-dev_ermod_lin-229.R
Diagnostic flags present.
See ?`loo-glossary` (sections `diag_diff` and `diag_elpd`)
or https://mc-stan.org/loo/reference/loo-glossary.html.
Loading required package: bayestestR
[ FAIL 4 | WARN 0 | SKIP 0 | PASS 209 ]
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-dev_ermod_emax.R:150:5'): plot_ermod
...[truncated]...
`.
Caused by error in `dplyr::all_of()`:
! Can't subset elements that don't exist.
x Elements `1` and `2` don't exist.
── Error ('test-dev_ermod_lin.R:229:5'): Exposure metrics selection ────────────
Error in `tidyr::pivot_longer(extract_data(x), dplyr::all_of(var_exp_order), names_to = ".exp_metric", values_to = ".exposure")`: i In argument: `dplyr::all_of(var_exp_order)`.
Caused by error in `dplyr::all_of()`:
! Can't subset elements that don't exist.
x Elements `1`, `2`, and `3` don't exist.
── Error ('test-dev_ermod_lin.R:427:5'): plot.ermod_exp_sel calls plot_er_exp_sel ──
Error in `tidyr::pivot_longer(extract_data(x), dplyr::all_of(var_exp_order), names_to = ".exp_metric", values_to = ".exposure")`: i In argument: `dplyr::all_of(var_exp_order)`.
Caused by error in `dplyr::all_of()`:
! Can't subset elements that don't exist.
x Elements `1`, `2`, and `3` don't exist.
[ FAIL 4 | WARN 0 | SKIP 0 | PASS 209 ]
Error:
! Test failures.
Execution halted
ERROR
r-release-linux-x86_64
tests
Running ‘testthat.R’ [171s/218s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> # This file is part of the standard setup for testthat.
> # It is recommended that you do not modify it.
> #
> # Where should you do additional test configuration?
> # Learn more about the roles of various files in:
> # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
> # * https://testthat.r-lib.org/articles/special-files.html
>
> library(testthat)
> library(BayesERtools)
>
> test_check("BayesERtools")
Loading required namespace: projpred
Saving _problems/test-dev_ermod_lin-229.R
Diagnostic flags present.
See ?`loo-glossary` (sections `diag_diff` and `diag_elpd`)
or https://mc-stan.org/loo/reference/loo-glossary.html.
Loading required package: bayestestR
[ FAIL 4 | WARN 0 | SKIP 0 | PASS 209 ]
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-dev_ermod_emax.R:150:5'): plot_e
...[truncated]...
`.
Caused by error in `dplyr::all_of()`:
! Can't subset elements that don't exist.
x Elements `1` and `2` don't exist.
── Error ('test-dev_ermod_lin.R:229:5'): Exposure metrics selection ────────────
Error in `tidyr::pivot_longer(extract_data(x), dplyr::all_of(var_exp_order), names_to = ".exp_metric", values_to = ".exposure")`: i In argument: `dplyr::all_of(var_exp_order)`.
Caused by error in `dplyr::all_of()`:
! Can't subset elements that don't exist.
x Elements `1`, `2`, and `3` don't exist.
── Error ('test-dev_ermod_lin.R:427:5'): plot.ermod_exp_sel calls plot_er_exp_sel ──
Error in `tidyr::pivot_longer(extract_data(x), dplyr::all_of(var_exp_order), names_to = ".exp_metric", values_to = ".exposure")`: i In argument: `dplyr::all_of(var_exp_order)`.
Caused by error in `dplyr::all_of()`:
! Can't subset elements that don't exist.
x Elements `1`, `2`, and `3` don't exist.
[ FAIL 4 | WARN 0 | SKIP 0 | PASS 209 ]
Error:
! Test failures.
Execution halted
Additional Issues
donttest
Details →
Check History
ERROR 10 OK · 0 NOTE · 0 WARNING · 3 ERROR · 0 FAILURE Jun 27, 2026
ERROR
r-devel-linux-x86_64-debian-gcc
tests
Running ‘testthat.R’ [108s/129s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > # This file is part of the standard setup for testthat. > # It is recommended that you do not modify it. > # > # Where should you do additiona ...[truncated]... dplyr::all_of(var_exp_order)`. Caused by error in `dplyr::all_of()`: ! Can't subset elements that don't exist. x Elements `1`, `2`, and `3` don't exist. [ FAIL 4 | WARN 0 | SKIP 0 | PASS 209 ] Error: ! Test failures. Execution halted
ERROR
r-devel-linux-x86_64-fedora-clang
tests
Running ‘testthat.R’ [291s/379s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > # This file is part of the standard setup for testthat. > # It is recommended that you do not modify it. > # > # Where should you do additiona ...[truncated]... dplyr::all_of(var_exp_order)`. Caused by error in `dplyr::all_of()`: ! Can't subset elements that don't exist. x Elements `1`, `2`, and `3` don't exist. [ FAIL 4 | WARN 0 | SKIP 0 | PASS 209 ] Error: ! Test failures. Execution halted
ERROR
r-devel-linux-x86_64-fedora-gcc
tests
Running ‘testthat.R’ [307s/396s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > # This file is part of the standard setup for testthat. > # It is recommended that you do not modify it. > # > # Where should you do additiona ...[truncated]... dplyr::all_of(var_exp_order)`. Caused by error in `dplyr::all_of()`: ! Can't subset elements that don't exist. x Elements `1`, `2`, and `3` don't exist. [ FAIL 4 | WARN 0 | SKIP 0 | PASS 209 ] Error: ! Test failures. Execution halted
OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Jun 9, 2026
ERROR 12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Jun 8, 2026
ERROR
r-devel-linux-x86_64-debian-gcc
package dependencies
Package required but not available: ‘rstanarm’ Packages suggested but not available for checking: 'xgxr', 'rsample' See section ‘The DESCRIPTION file’ in the ‘Writing R Extensions’ manual.