Simulation study is conducted to assess operating characteristics of hybrid control design with Bayesian dynamic borrowing, where the concurrent control is augmented by external control. The external controls are selected from external control pool using a propensity score matching. Commensurate power prior is used for Bayesian dynamic borrowing. The binary outcome is applicable.
psborrow.bin(
n.CT, n.CC, n.ECp, n.EC,
out.prob.CT, out.prob.CC, driftOR,
cov.C, cov.cor.C, cov.EC, cov.cor.EC, cov.effect,
psmatch.cov,
method.psest="glm", method.pslink="logit",
method.whomatch, method.matching, method.psorder, n.boot=100,
analysis.cov, method.borrow,
chains=2, iter=4000, warmup=floor(iter/2), thin=1,
alternative="greater", sig.level=0.025, nsim)
The psborrow.bin
returns a list containing the following objects:
Data frame containing results of Bayesian one-sided hypothesis
testing (whether or not the posterior probability that the log odds ratio
is greater or less than 0 exceeds 1 minus significance level): TRUE
when significant, otherwise FALSE
.
Data frame containing posterior mean, median, and sd of log odds ratio.
Data frame containing (1) overlapping coefficient of propensity score densities between treatment versus concurrent control plus external control and between concurrent control versus external control, (2) overlapping coefficient of continuous covariate densities between treatment versus concurrent control plus external control and between concurrent control versus external control, and (3) rate difference of binary covariate between treatment versus concurrent control plus external control and between concurrent control versus external control.
Number of patients in treatment group in the current trial.
Number of patients in concurrent control group in the current trial.
Number of patients in external control pool.
Number of patients in external control.
Odds ratio between concurrent and external control.
True log odds ratio
Method of estimating the propensity score.
Link function used in estimating the propensity score.
Option of who to match.
Propensity score matching method.
Order that the matching takes place when a nearest neighbor matching is used.
Number of patients in treatment group in the current trial.
Number of patients in concurrent control group in the current trial.
Number of patients in external control pool.
Number of patients in external control.
True rate of outcome in treatment group in the current trial.
True rate of outcome in concurrent control group in the current trial.
Odds ratio between concurrent and external control for which the bias should be plotted (odds in external control divided by odds in concurrent control).
List of covariate distributions for treatment and concurrent
control group in the current trial. Continuous and binary covariate are
applicable. The continuous covariate is assumed to follow a normal
distribution; for example, specified as
list(dist="norm", mean=0, sd=1, lab="cov1")
. The binary covariate is
assumed to follow a binomial distribution; for example, specified as
list(dist="binom", prob=0.4, lab="cov2")
. lab
is the column
name of the covariate in the data frame generated.
Matrix of correlation coefficients for each pair of covariate for treatment and concurrent control group in the current trial, specified as Gaussian copula parameter.
List of covariate distributions for external control. The
continuous covariate is assumed to follow a normal distribution; for example,
specified as list(dist="norm", mean=0, sd=1, lab="cov1")
. The binary
covariate is assumed to follow a binomial distribution; for example,
specified as list(dist="binom", prob=0.4, lab="cov2")
. lab
is
the column name of the covariate in the data frame generated, which must be
consistent with those used for cov.C
.
Matrix of correlation coefficients for each pair of covariate for external control, specified as Gaussian copula parameter.
Vector of covariate effects on the outcome, specified as odds ratio per one unit increase in continuous covariates or as odds ratio between categories for binary covariates.
Vector of names of covariates which are used for the
propensity score matching. The names of covariates must be included in
lab
values specified in cov.C
.
Method of estimating the propensity score. Allowable
options include, for example, "glm"
for generalized linear model
(e.g., logistic regression); "gam"
for generalized additive model;
"gbm"
for generalized boosted model; "lasso"
for lasso
regression; "rpart"
for classification tree. The default value is
method.psest="glm"
.
Link function used in estimating the propensity score.
Allowable options depend on the specific method.psest
value specified.
The default value is method.pslink="logit"
, which, along with
method.psest="glm"
, identifies the default method as logistic
regression.
Options of who to match. Allowable options include
conc.contl
for matching concurrent control to external control pool;
conc.treat
for matching treatment to external control pool;
conc.all
for matching treatment plus concurrent control to external
control pool; treat2contl
for matching treatment to concurrent control
plus external control pool.
Matching method. Allowable options include
"optimal"
for optimal matching; "nearest"
for nearest neighbor
matching without replacement; "med.optimal"
for equally splitting
patients in the current trial and taking the median of each subset, followed
by 1:1 optimal matching; "med.nearest"
for equally splitting
patients in the current trial and taking the median of each subset, followed
by 1:1 nearest neighbor matching without replacement; "km.optimal"
for
k-means clustering of patients in the current trial, followed by 1:1 optimal
matching; "km.nearest"
for k-means clustering of patients in the
current trial, followed by 1:1 nearest neighbor matching without replacement;
"cm.optimal"
for fuzzy c-means clustering of patients in the current
trial, followed by 1:1 optimal matching; "cm.nearest"
for fuzzy
c-means of patients in the current trial, followed by 1:1 nearest neighbor
matching without replacement; "boot.optimal"
for bootstrap sampling
from patients in the current trial, followed by 1:1 optimal matching;
"boot.nearest"
for bootstrap sampling from patient in the current
trial, followed by 1:1 nearest neighbor matching without replacement.
Order that the matching takes place when a nearest
neighbor matching is used. Allowable options include "largest"
,
where matching takes place in descending order of propensity score;
"smallest"
, where matching takes place in ascending order of
propensity score; "random"
, where matching takes place in a random
order; "data"
, where matching takes place based on the order of units
in the data. The matching order must be specified when using the nearest
neighbor matching.
Number of bootstrap sampling, which must be specified when
method.matching="boot.optimal"
or
method.matching="boot.nearest"
. The default value is n.boot=100
.
Vector of names of covariates which are used for the
Bayesian analysis with commensurate prior. The names of covariates must be
included in lab
values specified in cov.C
.
List of information borrowing method. "noborrow"
uses the concurrent data only. "fullborrow"
uses the external control
data without discounting. "cauchy"
uses the commensurate prior to
dynamically borrow the external control data, and the commensurability
parameter is assumed to follow a half-Cauchy distribution. "normal"
uses the commensurate prior to dynamically borrow the external control data,
and the commensurability parameter is assumed to follow a half-normal
distribution. "cauchy"
and "normal"
require to specify the
scale parameter scale
of half-Cauchy and half-normal distribution
respectively.
Number of Markov chains in MCMC sampling. The default value is
chains=2
.
Number of iterations for each chain (including warmup) in MCMC
sampling. The default value is iter=4000
.
Number of warmup (burnin) iterations per chain in MCMC
sampling. The default value is warmup=floor(iter/2)
.
Period for saving samples in MCMC sampling. The default value
is thin=1
.
Alternative hypothesis to be tested ("greater" or "less").
The default value is alternative="greater"
.
Significance level. The default value is
sig.level=0.025
.
Number of simulated trials.
The simulation study consists of three part: data generation
conducted by trial.simulation.bin
function, propensity score matching
conducted by psmatch
function, and Bayesian analysis with commensurate
prior conducted by commensurate.bin
function. Users can specify
different sets of covariates for the propensity score matching and the
Bayesian analysis.
n.CT <- 100
n.CC <- 50
n.ECp <- 200
n.EC <- 50
out.prob.CT <- 0.2
out.prob.CC <- 0.2
driftOR <- 1.0
cov.C <- list(list(dist="norm",mean=0,sd=1,lab="cov1"),
list(dist="binom",prob=0.4,lab="cov2"))
cov.cor.C <- rbind(c( 1,0.1),
c(0.1, 1))
cov.EC <- list(list(dist="norm",mean=0,sd=1,lab="cov1"),
list(dist="binom",prob=0.4,lab="cov2"))
cov.cor.EC <- rbind(c( 1,0.1),
c(0.1, 1))
cov.effect <- c(0.9,0.9)
psmatch.cov <- c("cov1","cov2")
method.whomatch <- "conc.treat"
method.matching <- "optimal"
method.psorder <- NULL
analysis.cov <- c("cov1")
method.borrow <- list(list(prior="noborrow"),
list(prior="normal",scale=0.5))
nsim <- 5
psborrow.bin(
n.CT=n.CT, n.CC=n.CC, n.ECp=n.ECp, n.EC=n.EC,
out.prob.CT=out.prob.CT, out.prob.CC=out.prob.CC, driftOR=driftOR,
cov.C=cov.C, cov.cor.C=cov.cor.C,
cov.EC=cov.EC, cov.cor.EC=cov.cor.EC, cov.effect=cov.effect,
psmatch.cov=psmatch.cov, method.whomatch=method.whomatch,
method.matching=method.matching, method.psorder=method.psorder,
analysis.cov=analysis.cov, method.borrow=method.borrow,
chains=1, iter=100, nsim=nsim)
Run the code above in your browser using DataLab