Shrinkage Based Forest Plots
Overview
Subgroup analyses are routinely performed in clinical trial analyses. From a methodological perspective, two key issues of subgroup analyses are multiplicity (even if only predefined subgroups are investigated) and the low sample sizes of subgroups which lead to highly variable estimates, see e.g. Yusuf et al (1991) doi:10.1001/jama.1991.03470010097038. This package implements subgroup estimates based on Bayesian shrinkage priors, see Carvalho et al (2019) https://proceedings.mlr.press/v5/carvalho09a.html. In addition, estimates based on penalized likelihood inference are available, based on Simon et al (2011) doi:10.18637/jss.v039.i05. The corresponding shrinkage based forest plots address the aforementioned issues and can complement standard forest plots in practical clinical trial analyses.
- Adapt to changes in
brms 2.22.0for the specification of baseline hazards. (#79)
From NEWS.md in the release
Install
Health
ERRORtestsr-devel-windows-x86_64, r-oldrel-windows-x86_64, r-release-windows-x86_64
r-devel-windows-x86_64
Running 'testthat.R' [110s]
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(bonsaiforest)
Attaching package: 'bonsaiforest'
The following object is masked from 'package:testthat':
compare
>
> test_check("bonsaiforest")
Compiling Stan program...
specified C++17
make cmd is
make -f "D:/RCompile/recent/R/etc/x64/Makeconf" -f "D:/RCompile/recent/R/share/make/winshlib.mk" CXX='$(CXX17) $(CXX17STD)' CXXFLAGS='$(CXX17FLAGS)' CXXPICFLAGS='$(CXX17PICFLAGS)' SHLIB_LDFLAGS='$(SHLIB_CXX17LDFLAGS)' SHLIB_LD='$(SHLIB_CXX17LD)' SHLIB="file63d4691c71a3.d
...[truncated]...
s)
8. └─brms:::eval2(call, envir = args, enclos = envir)
9. └─base::eval(expr, envir, ...)
10. └─base::eval(expr, envir, ...)
11. └─brms (local) .fun(...)
12. └─brms (local) .compile_model(model, ...)
13. ├─brms:::eval_silent(...)
14. │ └─base::eval(expr, envir)
15. │ └─base::eval(expr, envir)
16. └─brms::do_call(rstan::stan_model, args)
17. └─brms:::eval2(call, envir = args, enclos = envir)
18. └─base::eval(expr, envir, ...)
19. └─base::eval(expr, envir, ...)
20. └─rstan (local) .fun(model_code = .x1)
21. └─rstan:::cxxfunctionplus(...)
22. └─base::sink(type = "output")
[ FAIL 2 | WARN 25 | SKIP 12 | PASS 68 ]
Error:
! Test failures.
Execution haltedr-oldrel-windows-x86_64
Running 'testthat.R' [137s]
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(bonsaiforest)
Attaching package: 'bonsaiforest'
The following object is masked from 'package:testthat':
compare
>
> test_check("bonsaiforest")
Compiling Stan program...
make cmd is
make -f "D:/RCompile/recent/R-4.5.3/etc/x64/Makeconf" -f "D:/RCompile/recent/R-4.5.3/share/make/winshlib.mk" CXX='$(CXX17) $(CXX17STD)' CXXFLAGS='$(CXX17FLAGS)' CXXPICFLAGS='$(CXX17PICFLAGS)' SHLIB_LDFLAGS='$(SHLIB_CXX17LDFLAGS)' SHLIB_LD='$(SHLIB_CXX17LD)' SHLIB="file351b07790e0f.dll" WI
...[truncated]...
s)
8. └─brms:::eval2(call, envir = args, enclos = envir)
9. └─base::eval(expr, envir, ...)
10. └─base::eval(expr, envir, ...)
11. └─brms (local) .fun(...)
12. └─brms (local) .compile_model(model, ...)
13. ├─brms:::eval_silent(...)
14. │ └─base::eval(expr, envir)
15. │ └─base::eval(expr, envir)
16. └─brms::do_call(rstan::stan_model, args)
17. └─brms:::eval2(call, envir = args, enclos = envir)
18. └─base::eval(expr, envir, ...)
19. └─base::eval(expr, envir, ...)
20. └─rstan (local) .fun(model_code = .x1)
21. └─rstan:::cxxfunctionplus(...)
22. └─base::sink(type = "output")
[ FAIL 2 | WARN 25 | SKIP 12 | PASS 68 ]
Error:
! Test failures.
Execution haltedr-release-windows-x86_64
Running 'testthat.R' [104s]
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(bonsaiforest)
Attaching package: 'bonsaiforest'
The following object is masked from 'package:testthat':
compare
>
> test_check("bonsaiforest")
Compiling Stan program...
specified C++17
make cmd is
make -f "D:/RCompile/recent/R-4.6.1/etc/x64/Makeconf" -f "D:/RCompile/recent/R-4.6.1/share/make/winshlib.mk" CXX='$(CXX17) $(CXX17STD)' CXXFLAGS='$(CXX17FLAGS)' CXXPICFLAGS='$(CXX17PICFLAGS)' SHLIB_LDFLAGS='$(SHLIB_CXX17LDFLAGS)' SHLIB_LD='$(SHLIB_CXX17LD)' SHLIB="file46
...[truncated]...
s)
8. └─brms:::eval2(call, envir = args, enclos = envir)
9. └─base::eval(expr, envir, ...)
10. └─base::eval(expr, envir, ...)
11. └─brms (local) .fun(...)
12. └─brms (local) .compile_model(model, ...)
13. ├─brms:::eval_silent(...)
14. │ └─base::eval(expr, envir)
15. │ └─base::eval(expr, envir)
16. └─brms::do_call(rstan::stan_model, args)
17. └─brms:::eval2(call, envir = args, enclos = envir)
18. └─base::eval(expr, envir, ...)
19. └─base::eval(expr, envir, ...)
20. └─rstan (local) .fun(model_code = .x1)
21. └─rstan:::cxxfunctionplus(...)
22. └─base::sink(type = "output")
[ FAIL 2 | WARN 25 | SKIP 12 | PASS 68 ]
Error:
! Test failures.
Execution halted- ERROR10 OK, 3 ERRORNow
- ERROR12 OK, 1 ERROR2026-09-04
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-09
- ERROR12 OK, 1 ERROR2026-06-08
Show 4 earlier changesHide 4 earlier changes
- OK11 OK2026-04-25
- NOTE11 OK, 3 NOTE2026-04-22
- ERROR10 OK, 3 NOTE, 1 ERROR2026-04-18
- NOTE11 OK, 3 NOTE2026-03-10
Documentation
- Help pages
- 44 (3 internal)includes a package overview page
- Examples that run
- 96%27 run in a plain check · 1 only when donttest examples are enabled (R CMD check --as-cran)
- Exported functions with examples
- 100%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 0%
- Introduction HTML
Downloads
Repository
- PRs merged (all time)
- 93%
- Median days to close, 50 most recently updated closed issues
- 1
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
14 development-tooling and community-health practices detected across 7 families in the upstream repository
Checks run against github.com/insightsengineering/bonsaiforest on 2026-10-21.
Funding links: pharmaverse.org
Show all practicesHide 3 practices
Dependencies
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- 0.1.1Latest
- 0.1.02024-06-17
- RR 4.4.0 released · 2024-04-24
Package metadata
- First published
- 2024-06-17
- Total releases
- 2 / 2 yrs
- License
- Apache License 2.0 OSI
- Minimum R
- ≥ 4.1
- Bundled data
- 3.4 MB / 13 files
- Download size
- 3.7 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("bonsaiforest")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-24, which the citation names so these numbers can be found later. More on citing and the projects behind them.