Package: rdborrow 0.0.5.1

Matt Secrest

rdborrow: External Control Borrowing for Rare Disease Trials

Implements causal inference methods for incorporating external control data into randomized controlled trials (RCTs) with longitudinal outcomes. Provides an analysis module supporting weighting-based methods such as inverse probability weighting (IPW) and augmented inverse probability weighting (AIPW), difference-in-differences (DID), and synthetic control approaches for borrowing external control information, as well as a simulation module for generating trial and external control data, evaluating estimator performance via Monte Carlo studies, and conducting power analyses for sample size determination. Methods are based on Zhou et al. (2025) <doi:10.1093/jrsssa/qnae075> and Zhou et al. (2024) <doi:10.1080/10543406.2024.2330209>.

Authors:Lei Shi [aut], Matt Secrest [cre, aut], Herbert Pang [aut], Chen Chen [aut], Jiawen Zhu [aut], Genentech, Inc. [cph]

rdborrow_0.0.5.1.tar.gz
rdborrow_0.0.5.1.zip(r-4.7-any)rdborrow_0.0.5.1.zip(r-4.6-any)
rdborrow_0.0.5.1.tar.gz(r-4.7-any)rdborrow_0.0.5.1.tar.gz(r-4.6-any)
rdborrow_0.0.5.1.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
rdborrow/json (API)

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

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

Pkgdown/docs site:https://genentech.github.io

Datasets:

On CRAN:

Conda:

4.10 score 9 scripts 474 downloads 24 exports 41 dependencies

Last updated from:b073b4cd11. Checks:6 OK. Indexed: no.

TargetResultTimeFilesSyslog
linux-develOK225
source / vignettesOK315
linux-releaseOK241
windows-develOK190
windows-releaseOK196
wasm-releaseOK139

Exports:did_ec_aipwdid_ec_ipwdid_ec_orec_aipwec_ipwestimaterun_analysisrun_simulationscmsetup_analysis_OLEsetup_analysis_primarysetup_bootstrapsetup_method_DIDsetup_method_SCMsetup_method_weightingsetup_simulation_OLEsetup_simulation_primarysimulate_outcome_from_modelsimulate_trialsimulate_trial_statussimulate_trt_assignsimulate_X_copulasimulate_X_dct_mvnormsimulate_X_mixture

Dependencies:ADGofTestbackportsbootcheckmateclarabelcliclustercolorspacecopulacrayonCVXRECOSolveRformatRfutile.loggerfutile.optionsgluegmpgslhighshmslambda.rlatticelifecycleMatrixmvtnormnumDerivosqppcaPPpkgconfigprettyunitsprogresspsplineR6RcppRcppEigenrlangS7scsslamstabledistvctrs

Introduction to rdborrow
Overview | Methods | Primary analysis (placebo-controlled phase) | OLE phase analysis (open-label extension) | Simulation | Getting help | Quick start | References

Last update: 2026-10-08
Started: 2026-08-31

OLE Analysis Workflow
OLE phase | 1 DID methods | 1.1 DID-EC-IPW | 1.2 DID-EC-AIPW | 1.3 DID-EC-OR | 2 Synthetic control method | References

Last update: 2026-10-08
Started: 2026-08-31

Primary Analysis Workflow
Primary analysis | 1 Load data | 2 EC-IPW | 2.1 No borrowing (weight = 0) | 2.2 Optimal weight (data-adaptive) | 2.3 Bootstrap inference | 3 EC-AIPW | 3.1 No borrowing (weight = 0) | 3.2 Optimal weight (data-adaptive) | 3.3 Bootstrap inference | 4 Notes | References

Last update: 2026-10-08
Started: 2026-08-31

Simulation Workflow for Primary Analysis
Primary analysis | 1 Simulate a list of datasets for primary analysis | 1.1 Create basic setup | 1.2 Generate simulation data list for null hypothesis | 1.3 Generate simulation data list for alternative hypothesis | 2 Parametric inference | 3 Bootstrap inference | References

Last update: 2026-10-08
Started: 2026-08-31

Simulation Workflow for OLE Phase
OLE study | 1. Simulate a dataset for OLE study | 2 Bootstrap inference | References

Last update: 2026-09-24
Started: 2026-08-31

Readme and manuals

Help Manual

Help pageTopics
The rdborrow packagerdborrow-package rdborrow
DID-EC-AIPW methoddid_ec_aipw
DID-EC-IPW methoddid_ec_ipw
DID-EC-OR method constructordid_ec_or
EC-AIPW methodec_aipw
EC-IPW method constructorec_ipw
Run estimation for a method objectestimate estimate,did_ec_aipw_method-method estimate,did_ec_ipw_method-method estimate,did_ec_or_method-method estimate,ec_aipw_method-method estimate,ec_ipw_method-method estimate,scm_method-method
Run an analysis with external control borrowingrun_analysis
Evaluate operating characteristics via Monte Carlo simulationrun_simulation
SCM method constructorscm
Set up an open-label extension (OLE) analysissetup_analysis_OLE
Set up a primary analysis with external control borrowingsetup_analysis_primary
Setup bootstrap (Deprecated)setup_bootstrap
Setup method DID (Deprecated)setup_method_DID
Setup method SCM (Deprecated)setup_method_SCM
Setup method weighting (Deprecated)setup_method_weighting
Construct a simulation object for OLE analysissetup_simulation_OLE
Construct a simulation object for primary analysissetup_simulation_primary
Simulate outcomes from additive linear modelssimulate_outcome_from_model
Simulate trialssimulate_trial
Simulate trial participation statussimulate_trial_status
Simulate treatment assignmentsimulate_trt_assign
Simulate covariates using a copulasimulate_X_copula
Simulate covariates by discretizing a multivariate normalsimulate_X_dct_mvnorm
Simulate covariates from a Gaussian mixture modelsimulate_X_mixture
Synthetic example dataset for rdborrowSyntheticData
Unbalanced synthetic example dataset for rdborrowSyntheticDataII