A wrapper function for AIPW$new()$fit()$summary()
aipw_wrapper(
Y,
A,
verbose = TRUE,
W = NULL,
W.Q = NULL,
W.g = NULL,
Q.SL.library,
g.SL.library,
k_split = 10,
g.bound = 0.025,
stratified_fit = FALSE
)
Outcome (binary integer: 0 or 1)
Exposure (binary integer: 0 or 1)
Whether to print the result (logical; Default = FALSE)
covariates for both exposure and outcome models (vector, matrix or data.frame). If null, this function will seek for
inputs from W.Q
and W.g
.
Only valid when W
is null, otherwise it would be replaced by W
.
Covariates for outcome model (vector, matrix or data.frame).
Only valid when W
is null, otherwise it would be replaced by W
.
Covariates for exposure model (vector, matrix or data.frame)
SuperLearner libraries or sl3 learner object (Lrnr_base) for outcome model
SuperLearner libraries or sl3 learner object (Lrnr_base) for exposure model
Number of splitting (integer; range: from 1 to number of observation-1):
if k_split=1, no cross-fitting;
if k_split>=2, cross-fitting is used
(e.g., k_split=10
, use 9/10 of the data to estimate and the remaining 1/10 leftover to predict).
NOTE: it's recommended to use cross-fitting.
Value between [0,1] at which the propensity score should be truncated. Defaults to 0.025.
An indicator for whether the outcome model is fitted stratified by exposure status in thefit()
method.
Only when using stratified_fit()
to turn on stratified_fit = TRUE
, summary
outputs average treatment effects among the treated and the controls.
A fitted AIPW
object with summarised results