Learn R Programming

psborrow (version 0.2.3)

Bayesian Dynamic Borrowing with Propensity Score

Description

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

Copy Link

Version

Install

install.packages('psborrow')

Monthly Downloads

669

Version

0.2.3

License

Apache License (>= 2)

Maintainer

Isaac Gravestock

Last Published

June 23rd, 2025

Functions in psborrow (0.2.3)

plot_bias

Plot bias
simu_cov

Simulate covariates
set_prior

Specify prior distributions and predictors for MCMC methods
set_clin

Specify parameters for enrollment time, drop-out pattern and analysis start time
run_mcmc_p

Run MCMC for multiple scenarios with provided data with parallel processing
set_n

Simulate external trial indicator and treatment arm indicator
valid_mcmc

validate the operational parameters for MCMC method
plot_hr

Plot mean posterior hazard ratio between treatment and control
simu_time

Simulate time-to-events for multiple scenarios
rej_est

Generate summary statistics for the MCMC chains
run_mcmc

Run MCMC for multiple scenarios with provided data
set_event

Set up time-to-events
c,.priorClass-method

Concatenate multiple .priorClasss class
apply_mcmc

Fit Dynamic Borrowing MCMC Model
ps_message

Conditional Message
fix_col_names

Fix Column Names
.clinClass-class

S4 Class for specifying parameters for enrollment time, drop-out pattern and analysis start time
plot_type1error

Plot type 1 error
add_time

Simulate survival times
.eventClass-class

S4 Class for setting parameters for time-to-events
get_summary

Generate summary statistics of a simulation scenario
.priorClass-class

S4 Class for specifying prior distributions and predictors for MCMC methods
.covClass-class

S4 Class for setting up covariates
add_cov

Simulate covariates with a multivariate normal distribution
add_mcmc

Generating posterior samples from MCMC
c,.covClass-method

Concatenate multiple .covClasss classes
is_psborrow_dev

Check if user is in psborrow development environment
plot_mse

Plot mean squared error (MSE)
plot_power

Plot power
set_cov

Set up covariates
match_cov

Match