Skip to content

bonsaiforest

0.1.1Package record

Shrinkage Based Forest Plots

0packages depend
3Kdownloads / year
96.4%test coverage
10/13flavors OK

Overview

About

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.

Changes in 0.1.1
  • Adapt to changes in brms 2.22.0 for the specification of baseline hazards. (#79)

From NEWS.md in the release

Install

Health

CRAN checks
3ERROR10OK
Check messages
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 halted

r-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 halted

r-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

CRAN check page ↗

Slowest check: 14.1 min · r-release-linux-x86_64
Status changes
  • 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
Advisories

none known

Documentation

In release 0.1.1
README· In the repository, left out of the releaseVignettesYes · 1 · dynamicNEWSYes · 100% structured · mentions 0.1.1Citation fileNo
Description cites a JSS article
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%
Vignettes (1)

Downloads

3K
CRAN downloads in the past year
Rank #13,108 · ~8/day · ~248/mo
Daily download trend is not available in this view yet.
34130 days
87790 days
3K1 year
Compare downloads with other packages →
Also on576 r2u27 autocran

Repository

3Stars
1Forks
2Open issues
2Open PRs
2Releases
85Commits
6Commit identities
statistical-engineering
85 commits · Last activity 2024-11-29 · Default branch at 0.1.1.9001, ahead of CRAN 0.1.1 (checked 2026-10-21)
Responsiveness
How these are sampled
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

2024-07-21 · 32026-07-07 · 3
PracticesBeta

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.

Continuous integration (1)
GitHub Actions
Governance and community (5)
Code of conduct (inherited from insightsengineering)Contributing guide (inherited from insightsengineering)Issue templatesCODEOWNERS

Funding links: pharmaverse.org

Docs source (3)
README.Rmdpkgdown

GitHub Pages site last deployed 2024-11-29

Coverage (1)
Coverage reporting
Show all practicesHide 3 practices
Reproducibility and dev environment (1)
data-raw/
Automation and maintenance (1)
pre-commit
Lint, format, editor (2)
lintrRStudio project
How this is detected·Detection ruleset v4 (2026-10-20)

Dependencies

Declared dependencies
19 external dependencies (excludes base and recommended)

Installing bonsaiforest adds 97 packages (49 with compiled code, 86 MB of source tarballs). Heaviest: BH 14 MB, stringi 11 MB, ggplot2 6.0 MB.

Depends (1)
R >= 4.1
LinkingTo (2)
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Datasets

People & History

People (5)
Maintainer since 0.1.0 (2024)
Copyright holder, Funder
Releases (2)

Pick two releases to compare their code metrics.

  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • 0.1.1Latest
    record
    2024-09-27 · current release · diff ↗
  • 0.1.0
    record
    2024-06-17
  • R
    R 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")
Gravestock, I., F. Hoffmann-La Roche AG, Sabanés Bové, D., Vazquez Rabunal, M., & Wolbers, M. (2024). bonsaiforest: Shrinkage Based Forest Plots (Version 0.1.1) [Computer software]. https://doi.org/10.32614/CRAN.package.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.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for bonsaiforest version 0.1.1 [Data set]. HJJB, LLC. Data release v2026-10-24. https://doi.org/10.5281/zenodo.21843040

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.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy