Skip to content

psBayesborrow

Bayesian Information Borrowing with Propensity Score Matching

v1.1.0 · Mar 4, 2024 · MIT + file LICENSE

Description

Hybrid control design is a way to borrow information from external controls to augment concurrent controls in a randomized controlled trial and is expected to overcome the feasibility issue when adequate randomized controlled trials cannot be conducted. A major challenge in the hybrid control design is its inability to eliminate a prior-data conflict caused by systematic imbalances in measured or unmeasured confounding factors between patients in the concurrent treatment/control group and external controls. To prevent the prior-data conflict, a combined use of propensity score matching and Bayesian commensurate prior has been proposed in the context of hybrid control design. The propensity score matching is first performed to guarantee the balance in baseline characteristics, and then the Bayesian commensurate prior is constructed while discounting the information based on the similarity in outcomes between the concurrent and external controls. 'psBayesborrow' is a package to implement the propensity score matching and the Bayesian analysis with commensurate prior, as well as to conduct a simulation study to assess operating characteristics of the hybrid control design, where users can choose design parameters in flexible and straightforward ways depending on their own application.

Downloads

CRAN

276

Last 30 days

17417th

638

Last 90 days

2.1K

Last year

Trend: +91.7% (30d vs prior 30d)

r2u CRAN

24

Last 30 days

115

Last 90 days

402

Last year

Trend: -40% (30d vs prior 30d)

autoCRAN

4

Last 7 days

10

Last 30 days

1

All-time

autoCRAN-only: this name is served only by autoCRAN, so the count is exact.

CRAN Check Status

2 NOTE
11 OK
Show all 13 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang NOTE
r-devel-linux-x86_64-fedora-gcc NOTE
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK
Check details (2 non-OK)
NOTE r-devel-linux-x86_64-fedora-clang

dependencies in R code

Namespaces in Imports field not imported from:
  ‘RcppParallel’ ‘rstantools’
  All declared Imports should be used.
NOTE r-devel-linux-x86_64-fedora-gcc

dependencies in R code

Namespaces in Imports field not imported from:
  ‘RcppParallel’ ‘rstantools’
  All declared Imports should be used.

Check History

NOTE 11 OK · 2 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Jun 9, 2026
NOTE r-devel-linux-x86_64-fedora-clang

dependencies in R code

Namespaces in Imports field not imported from:
  ‘RcppParallel’ ‘rstantools’
  All declared Imports should be used.
NOTE r-devel-linux-x86_64-fedora-gcc

dependencies in R code

Namespaces in Imports field not imported from:
  ‘RcppParallel’ ‘rstantools’
  All declared Imports should be used.
ERROR 10 OK · 2 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Jun 7, 2026
ERROR r-devel-linux-x86_64-debian-gcc

PDF version of manual

Rd conversion errors:
Converting parsed Rd's to LaTeX Warning in file(out, "wt") :
  cannot open file '/tmp/RtmpbQZubc/ltx399a587c718cf8/psborrow.summary.tex': No space left on device
Error in file(out, "wt") : cannot open the connection
NOTE r-devel-linux-x86_64-fedora-clang

dependencies in R code

Namespaces in Imports field not imported from:
  ‘RcppParallel’ ‘rstantools’
  All declared Imports should be used.
NOTE r-devel-linux-x86_64-fedora-gcc

dependencies in R code

Namespaces in Imports field not imported from:
  ‘RcppParallel’ ‘rstantools’
  All declared Imports should be used.
NOTE 9 OK · 5 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Apr 22, 2026
NOTE r-devel-linux-x86_64-fedora-clang

dependencies in R code

Namespaces in Imports field not imported from:
  ‘RcppParallel’ ‘rstantools’
  All declared Imports should be used.
NOTE r-devel-linux-x86_64-fedora-gcc

dependencies in R code

Namespaces in Imports field not imported from:
  ‘RcppParallel’ ‘rstantools’
  All declared Imports should be used.
NOTE r-oldrel-macos-arm64

installed package size

installed size is 136.3Mb
  sub-directories of 1Mb or more:
    libs  135.8Mb
NOTE r-oldrel-macos-x86_64

installed package size

installed size is 130.5Mb
  sub-directories of 1Mb or more:
    libs  130.0Mb
NOTE r-oldrel-windows-x86_64

installed package size

installed size is  8.8Mb
  sub-directories of 1Mb or more:
    libs   8.4Mb
ERROR 8 OK · 5 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Apr 18, 2026
NOTE r-devel-linux-x86_64-fedora-clang

dependencies in R code

Namespaces in Imports field not imported from:
  ‘RcppParallel’ ‘rstantools’
  All declared Imports should be used.
NOTE r-devel-linux-x86_64-fedora-gcc

dependencies in R code

Namespaces in Imports field not imported from:
  ‘RcppParallel’ ‘rstantools’
  All declared Imports should be used.
ERROR r-devel-windows-x86_64

whether package can be installed

Installation failed.
See 'd:/Rcompile/CRANpkg/local/4.6/psBayesborrow.Rcheck/00install.out' for details.
NOTE r-oldrel-macos-arm64

installed package size

installed size is 136.3Mb
  sub-directories of 1Mb or more:
    libs  135.8Mb
NOTE r-oldrel-macos-x86_64

installed package size

installed size is 130.5Mb
  sub-directories of 1Mb or more:
    libs  130.0Mb
NOTE r-oldrel-windows-x86_64

installed package size

installed size is  8.8Mb
  sub-directories of 1Mb or more:
    libs   8.4Mb
NOTE 9 OK · 5 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Apr 10, 2026
NOTE r-devel-linux-x86_64-fedora-clang

dependencies in R code

Namespaces in Imports field not imported from:
  ‘RcppParallel’ ‘rstantools’
  All declared Imports should be used.
NOTE r-devel-linux-x86_64-fedora-gcc

dependencies in R code

Namespaces in Imports field not imported from:
  ‘RcppParallel’ ‘rstantools’
  All declared Imports should be used.
NOTE r-oldrel-macos-arm64

installed package size

installed size is 136.3Mb
  sub-directories of 1Mb or more:
    libs  135.8Mb
NOTE r-oldrel-macos-x86_64

installed package size

installed size is 130.5Mb
  sub-directories of 1Mb or more:
    libs  130.0Mb
NOTE r-oldrel-windows-x86_64

installed package size

installed size is  8.8Mb
  sub-directories of 1Mb or more:
    libs   8.4Mb
ERROR 8 OK · 5 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Apr 9, 2026
ERROR r-devel-linux-x86_64-debian-gcc

package dependencies

Package required but not available: ‘MatchIt’

See section ‘The DESCRIPTION file’ in the ‘Writing R Extensions’
manual.
NOTE r-devel-linux-x86_64-fedora-clang

dependencies in R code

Namespaces in Imports field not imported from:
  ‘RcppParallel’ ‘rstantools’
  All declared Imports should be used.
NOTE r-devel-linux-x86_64-fedora-gcc

dependencies in R code

Namespaces in Imports field not imported from:
  ‘RcppParallel’ ‘rstantools’
  All declared Imports should be used.
NOTE r-oldrel-macos-arm64

installed package size

installed size is 136.3Mb
  sub-directories of 1Mb or more:
    libs  135.8Mb
NOTE r-oldrel-macos-x86_64

installed package size

installed size is 130.5Mb
  sub-directories of 1Mb or more:
    libs  130.0Mb
NOTE r-oldrel-windows-x86_64

installed package size

installed size is  8.8Mb
  sub-directories of 1Mb or more:
    libs   8.4Mb
NOTE 9 OK · 5 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026
NOTE r-devel-linux-x86_64-fedora-clang

dependencies in R code

Namespaces in Imports field not imported from:
  ‘RcppParallel’ ‘rstantools’
  All declared Imports should be used.
NOTE r-devel-linux-x86_64-fedora-gcc

dependencies in R code

Namespaces in Imports field not imported from:
  ‘RcppParallel’ ‘rstantools’
  All declared Imports should be used.
NOTE r-oldrel-macos-arm64

installed package size

installed size is 136.3Mb
  sub-directories of 1Mb or more:
    libs  135.8Mb
NOTE r-oldrel-macos-x86_64

installed package size

installed size is 130.5Mb
  sub-directories of 1Mb or more:
    libs  130.0Mb
NOTE r-oldrel-windows-x86_64

installed package size

installed size is  8.8Mb
  sub-directories of 1Mb or more:
    libs   8.4Mb

Code

Structure

Lines of code

14,575

Files

78

Compiled share

65.7%

Has compiled src

Yes

Language breakdown

R 3,089 (21.2%)C/C++/src 9,575 (65.7%)Tests 66 (0.5%)Docs 1,845 (12.7%)

API

Exported functions

12

Internal functions

1

Recent export changes

v1.0.0+12 commensurate.bin, commensurate.cont, commensurate.t2e +9 more

Testing & CI

Has tests

Yes

Test-to-code ratio

0.02

testthat edition

CI present

No

CI type

[]

PR gated

No

Docs

Return-value doc rate

100%

\dontrun example ratio

0%

Roxygen coverage

100%

Has pkgdown

No

NEWS present

Yes

Health & Security signals

Informational signals; not verdicts.

on.exit coverage

Unsafe pattern score

0

Dep constraint coverage

30.8%

Secret pattern count

0

Bundled 3rd-party code

2 items

Portability & License

Min R version

3.4.0

System requirements

1

C++ standard

C++14

License

MIT + file LICENSE

License flags

SPDX valid, OSI approved

History

Versions

2

First release

2024-02-09

Latest release

2024-03-04

Avg cadence

24 days

Cold removal rate

Dep drift

0

LOC over versions

v1.0.0: 14,563 LOCv1.1.0: 14,575 LOC

Per-file churn detail lives in the source pipeline: https://github.com/r-observatory/cran-code-metrics.

Dependency Network

Dependencies Reverse dependencies copula Rcpp RcppParallel rstan rstantools boot MatchIt optmatch survival e1071 overlapping psBayesborrow

Version History

3 tracked
new 1.1.0 Mar 10, 2026
updated 1.1.0 ← 1.0.0 diff Mar 3, 2024
new 1.0.0 Feb 8, 2024