psmatch {psBayesborrow} | R Documentation |
Propensity score matching
Description
Propensity score matching is implemented to select external controls who are more relevant to patients in the current trial with respect to covariates of interest.
Usage
psmatch(
formula, data, n.EC,
method.psest="glm", method.pslink="logit",
method.whomatch, method.matching, method.psorder, n.boot=100)
Arguments
formula |
Object of class |
data |
Data frame, which must contain variables named |
n.EC |
Number of patients in external control to be selected, which must be smaller than the number of patients in external control pool. |
method.psest |
Method of estimating the propensity score. Allowable
options include, for example, |
method.pslink |
Link function used in estimating the propensity score.
Allowable options depend on the specific |
method.whomatch |
Options of who to match. Allowable options include
|
method.matching |
Propensity score matching method. Allowable options include
|
method.psorder |
Order that the matching takes place when a nearest
neighbor matching is used. Allowable options include |
n.boot |
Number of bootstrap sampling, which must be specified when
|
Details
The propensity score is defined as the conditional probability of
having been included in the current trial given observed covariates. There
are four options applicable for to whom the patients in external control
pool are matched, including (i) concurrent control versus external control
pool ("conc.contl"
), (ii) treatment versus external control pool
("conc.treat"
), (iii) treatment plus concurrent control versus
external control pool ("conc.all"
), and (iv) treatment versus
concurrent control plus external control pool ("treat2contl"
).
Along with method.whomatch="conc.contl"
, two 1:1 matching methods are
applicable: (1) optimal matching ("optimal"
), and (2) nearest neighbor
matching without caliper ("nearest"
). Along with
method.whomatch="conc.treat"
or method.whomatch="conc.all"
,
ten matching methods are applicable: (1) optimal matching, where 1:1
matching is first done, followed by random sampling ("optimal"
),
(2) nearest neighbor matching, where caliper is tuned iteratively
to obtain the fixed number of external controls ("nearest"
), (3)
equally splitting patients in the current trial and taking the median of
each subset, followed by 1:1 optimal matching ("medm.optimal"
), (4)
equally splitting patients in the current trial and taking the median of
each subset, followed by 1:1 nearest neighbor matching matching
("med.nearest"
), (5) k-means clustering of patients in the current
trial, followed by 1:1 optimal matching ("km.optimal"
), (6) k-means
clustering of patients in the current trial, followed by 1:1 nearest neighbor
matching ("km.nearest"
), (7) fuzzy c-means clustering of patients in
the current trial, followed by 1:1 optimal matching ("cm.optimal"
),
(8) fuzzy c-means of patients in the current trial, followed by 1:1 nearest
neighbor matching ("cm.nearest"
), (9) bootstrap sampling from patients
in the current trial, followed by 1:1 optimal matching
("boot.nearest"
), and (10) bootstrap sampling from patient in the
current trial, followed by 1:1 nearest neighbor matching
("boot.nearest"
). Along with method.whomatch="treat2contl"
,
two matching methods are applicable: (1) optimal matching, followed by
random sampling ("optimal"
), and (2) nearest neighbor matching, where
caliper is tuned iteratively to obtain the fixed number of external controls
("nearest"
).
Value
The psmatch
returns a list containing the following objects:
subjid.EC |
Vector of subject ID of external control. |
data.ps |
Data frame with estimated propensity score. |
References
Austin PC. A comparison of 12 algorithms for matching on the propensity score. Statistics in Medicine 2014; 33:1057-1069.
Lin J, Gamalo-Siebers M, Tiwari R. Propensity score matched augmented controls in randomized clinical trials: A case study. Pharmaceutical Statistics 2018; 17:629-647.
Lin J, Gamalo-Siebers M, Tiwari R. Propensity-score-based priors for Bayesian augmented control design. Pharmaceutical Statistics 2019; 18:223-238.
Rosenbaum PR. Optimal matching for observational studies. Journal of the American Statistical Association 1989; 84:1024-1032.
Sawamoto R, Oba K, Matsuyama Y. Bayesian adaptive randomization design incorporating propensity score-matched historical controls. Pharmaceutical Statistics 2022; 21:1074-1089.
Examples
n.CT <- 100
n.CC <- 50
nevent.C <- 100
n.ECp <- 1000
nevent.ECp <- 800
accrual <- 16
out.mevent.CT <- 6
out.mevent.CC <- 6
driftHR <- 1
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.1,0.1)
indata <- trial.simulation.t2e(
n.CT=n.CT, n.CC=n.CC, nevent.C=nevent.C,
n.ECp=n.ECp, nevent.ECp=nevent.ECp, accrual=accrual,
out.mevent.CT, out.mevent.CC, driftHR,
cov.C=cov.C, cov.cor.C=cov.cor.C,
cov.EC=cov.EC, cov.cor.EC=cov.cor.EC, cov.effect=cov.effect)
n.EC <- 50
method.whomatch <- "conc.treat"
method.matching <- "optimal"
method.psorder <- NULL
psmatch(
study~cov1+cov2, data=indata, n.EC=n.EC,
method.whomatch=method.whomatch, method.matching=method.matching,
method.psorder=method.psorder)