Package: psborrow 0.2.4

Isaac Gravestock

psborrow: Bayesian Dynamic Borrowing with Propensity Score

A tool which aims to help evaluate the effect of external borrowing using an integrated approach described in Lewis et al., (2019) <doi:10.1080/19466315.2018.1497533> that combines propensity score and Bayesian dynamic borrowing methods.

Authors:Isaac Gravestock [cre, ctb], Craig Gower-Page [aut], Matt Secrest [ctb], Yichen Lu [aut], Aijing Lin [aut], F. Hoffmann-La Roche AG [cph, fnd]

psborrow_0.2.4.tar.gz
psborrow_0.2.4.zip(r-4.7)psborrow_0.2.4.zip(r-4.6)psborrow_0.2.4.zip(r-4.5)
psborrow_0.2.4.tgz(r-4.6-any)psborrow_0.2.4.tgz(r-4.5-any)
psborrow_0.2.4.tar.gz(r-4.7-any)psborrow_0.2.4.tar.gz(r-4.6-any)
psborrow_0.2.4.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
psborrow/json (API)
NEWS

# Install 'psborrow' in R:
install.packages('psborrow', repos = c('https://pharmaverse.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/genentech/psborrow/issues

Uses libs:
  • jags– Just Another Gibbs Sampler for Bayesian MCMC - binary JAGS is Just Another Gibbs Sampler. It is a program for analysis of Bayesian hierarchical models using Markov Chain Monte Carlo (MCMC) simulation not wholly unlike BUGS. JAGS was written with three aims in mind: * To have an engine for the BUGS language that runs on Unix * To be extensible, allowing users to write their own functions, distributions and samplers. * To be a plaftorm for experimentation with ideas in Bayesian modelling This package contains the 'jags' binary as well as the associated shared library modules loaded by the binary.
  • c++– GNU Standard C++ Library v3

On CRAN:

Conda:

jagscpp

4.08 score 4 scripts 579 downloads 18 exports 45 dependencies

Last updated from:34c21319ea. Checks:9 OK. Indexed: no.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK267
source / vignettesOK191
linux-release-x86_64OK260
macos-release-arm64OK192
macos-oldrel-arm64OK133
windows-develOK247
windows-releaseOK348
windows-oldrelOK228
wasm-releaseOK125

Exports:apply_mcmcextract_samplesget_summarymatch_covplot_biasplot_hrplot_mseplot_powerplot_type1errorrun_mcmcrun_mcmc_pset_clinset_covset_eventset_nset_priorsimu_covsimu_time

Dependencies:backportschkclicodacodetoolscpp11data.tabledoParalleldplyrfarverforeachformatRfutile.loggerfutile.optionsgenericsggplot2gluegtableisobanditeratorslabelinglambda.rlatticelifecyclemagrittrMatchItMatrixmvtnormpillarpkgconfigR6RColorBrewerRcppRcppProgressrjagsrlangS7scalessurvivaltibbletidyselectutf8vctrsviridisLitewithr

Analysing data with psborrow

Rendered fromanalysis.html.asisusingR.rsp::asison May 09 2026.

Last update: 2022-05-16
Started: 2022-05-16

User Guide: Dynamic Borrowing with psborrow

Rendered fromuser_guide.html.asisusingR.rsp::asison May 09 2026.

Last update: 2022-05-16
Started: 2022-05-16

Readme and manuals

Help Manual

Help pageTopics
S4 Class for specifying parameters for enrollment time, drop-out pattern and analysis start time.clinClass .clinClass-class
S4 Class for setting up covariates.covClass .covClass-class
S4 Class for setting parameters for time-to-events.eventClass .eventClass-class
S4 Class for specifying prior distributions and predictors for MCMC methods.priorClass .priorClass-class
Fit Dynamic Borrowing MCMC Modelapply_mcmc extract_samples summary.apply_mcmc
Concatenate multiple '.covClasss' classesc,.covClass-method
Concatenate multiple '.priorClasss' classc,.priorClass-method
Fix Column Namesfix_col_names
Generate summary statistics of a simulation scenarioget_summary
Check if user is in psborrow development environmentis_psborrow_dev
Matchmatch_cov
Plot biasplot_bias
Plot mean posterior hazard ratio between treatment and controlplot_hr
Plot mean squared error (MSE)plot_mse
Plot powerplot_power
Plot type 1 errorplot_type1error
Conditional Messageps_message
Generate summary statistics for the MCMC chainsrej_est
Run MCMC for multiple scenarios with provided datarun_mcmc
Run MCMC for multiple scenarios with provided data with parallel processingrun_mcmc_p
Specify parameters for enrollment time, drop-out pattern and analysis start timeset_clin
Set up covariatesset_cov
Set up time-to-eventsset_event
Simulate external trial indicator and treatment arm indicatorset_n
Specify prior distributions and predictors for MCMC methodsset_prior
Simulate covariatessimu_cov simu_cov,matrix-method
Simulate time-to-events for multiple scenariossimu_time