ATE_external {CausalMetaR} | R Documentation |
Estimating the Average Treatment Effect (ATE) in an external target population using multi-source data
Description
Doubly-robust and efficient estimator for the ATE in an external target population using multi-source data.
Usage
ATE_external(
X,
X_external,
Y,
S,
A,
cross_fitting = FALSE,
replications = 10L,
source_model = "MN.glmnet",
source_model_args = list(),
treatment_model_type = "separate",
treatment_model_args = list(),
external_model_args = list(),
outcome_model_args = list(),
show_progress = TRUE
)
Arguments
X |
Data frame (or matrix) containing the covariate data in the multi-source data. It should have |
X_external |
Data frame (or matrix) containing the covariate data in the external target population. It should have |
Y |
Vector of length |
S |
Vector of length |
A |
Vector of length |
cross_fitting |
Logical specifying whether sample splitting and cross fitting should be used. |
replications |
Integer specifying the number of sample splitting and cross fitting replications to perform, if |
source_model |
Character string specifying the (penalized) multinomial logistic regression for estimating the source model. It has two options: " |
source_model_args |
List specifying the arguments for the source model (in glmnet or nnet). |
treatment_model_type |
Character string specifying how the treatment model is estimated. Options include " |
treatment_model_args |
List specifying the arguments for the treatment model (in SuperLearner). |
external_model_args |
List specifying the arguments for the external model (in SuperLearner). |
outcome_model_args |
List specifying the arguments for the outcome model (in SuperLearner). |
show_progress |
Logical specifying whether to print a progress bar for the cross-fit replicates completed, if |
Details
Data structure:
The multi-source dataset consists the outcome Y
, source S
, treatment A
, and covariates X
() in the internal populations. The data sources can be trials, observational studies, or a combination of both.
The external dataset contains only covariates X_external
().
Estimation of nuissance parameters:
The following models are fit:
External model:
, where
takes value 1 if the subject belongs to any of the internal dataset and 0 if the subject belongs to the external dataset
Propensity score model:
. We perform the decomposition
and estimate
(i.e., the treatment model) and
(i.e., the source model).
Outcome model:
The models are estimated by SuperLearner with the exception of the source model which is estimated by glmnet or nnet.
ATE estimation:
The ATE estimator is
where , and
.
This estimator is doubly robust and non-parametrically efficient.
To achieve non-parametric efficiency and asymptotic normality, it requires that .
In addition, sample splitting and cross-fitting can be performed to avoid the Donsker class assumption.
When a data source is a randomized trial, it is still recommended to estimate the propensity score for optimal efficiency.
Value
An object of class "ATE_external". This object is a list with the following elements:
df_dif |
A data frame containing the treatment effect (mean difference) estimates for the extenal data. |
df_A0 |
A data frame containing the potential outcome mean estimates under A = 0 for the extenal data. |
df_A1 |
A data frame containing the potential outcome mean estimates under A = 1 for the extenal data. |
fit_outcome |
Fitted outcome model. |
fit_source |
Fitted source model. |
fit_treatment |
Fitted treatment model(s). |
fit_external |
Fitted external model. |
References
Dahabreh, I.J., Robertson, S.E., Petito, L.C., Hernán, M.A. and Steingrimsson, J.A. (2019) Efficient and robust methods for causally interpretable meta‐analysis: Transporting inferences from multiple randomized trials to a target population, Biometrics.
Wang, G., McGrath, S., Lian, Y. and Dahabreh, I. (2024) CausalMetaR: An R package for performing causally interpretable meta-analyses, arXiv preprint arXiv:2402.04341.
Examples
ae <- ATE_external(
X = dat_multisource[, 1:10],
Y = dat_multisource$Y,
S = dat_multisource$S,
A = dat_multisource$A,
X_external = dat_external[, 1:10],
source_model = "MN.glmnet",
source_model_args = list(),
treatment_model_type = "separate",
treatment_model_args = list(
family = binomial(),
SL.library = c("SL.glmnet", "SL.nnet", "SL.glm"),
cvControl = list(V = 5L)
),
external_model_args = list(
family = binomial(),
SL.library = c("SL.glmnet", "SL.nnet", "SL.glm"),
cvControl = list(V = 5L)
),
outcome_model_args = list(
family = gaussian(),
SL.library = c("SL.glmnet", "SL.nnet", "SL.glm"),
cvControl = list(V = 5L)
)
)