Skip to contents

Package Overview

rdborrow-package rdborrow
The rdborrow package

Analysis

Set up and run analyses

setup_analysis_primary()
Construct an analysis_primary object
setup_analysis_OLE()
Construct an analysis_OLE object
run_analysis()
run analysis

Simulation

Set up and run simulations

setup_simulation_primary()
Construct a simulation object for primary analysis
setup_simulation_OLE()
Construct a simulation object for OLE analysis
run_simulation()
Run simulation from a simualtion_obj
setup_simulation_report()
setup_simulation_report

Method Configuration

Configure estimation methods

setup_method_weighting()
Construct a method_weighting object
setup_method_DID()
Construct a method_DID object
setup_method_SCM()
Construct a method_SCM object
setup_bootstrap()
Construct a bootstrap object

Weighting Estimators

IPW and AIPW methods for primary analysis

EC_IPW_OPT()
Using IPW with external borrowing
EC_IPW_OPT_bootstrap()
Using IPW with external borrowing
EC_AIPW_OPT()
Using AIPW with external borrowing
EC_AIPW_OPT_bootstrap()
Using AIPW with external borrowing

Difference-in-Differences Estimators

DID methods for OLE analysis

DID_EC_IPW()
Difference in difference + IPW + external control borrowing
DID_EC_IPW_bootstrap()
Bootstrap statistic for DID + IPW
DID_EC_AIPW()
Difference in difference + AIPW + external control borrowing
DID_EC_AIPW_bootstrap()
Difference in difference + AIPW + external control borrowing
DID_EC_OR()
Difference in difference + outcome regression + external control borrowing
DID_EC_OR_bootstrap()
Difference in difference + outcome regression + external control borrowing

Synthetic Control Method

SCM estimator and helpers

SCM()
Implement the Synthetic Control Method
subject_SC()
Find synthetic control for one specific subject
lambdacv()
Find the optimal lambda via LOOCV

Data Generation

Simulate trial data

simulate_trial()
Simulate trials
simulate_X_copula()
Simulate covariates using a copula
simulate_X_dct_mvnorm()
Simulate covariates by discretizing a multivariate normal
simulate_X_mixture()
Simulate covariates from a Gaussian mixture model
simulate_trt_assign()
Simulate treatment assignment
simulate_trial_status()
Simulate trial participation status
simulate_outcome_from_model()
Simulate outcomes from additive linear models

Classes

S4 class documentation

Data

Example datasets

SyntheticData
Synthetic example dataset for rdborrow