AIPW wrapper function
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 )
Y |
Outcome (binary integer: 0 or 1) |
A |
Exposure (binary integer: 0 or 1) |
verbose |
Whether to print the result (logical; Default = FALSE) |
W |
covariates for both exposure and outcome models (vector, matrix or data.frame). If null, this function will seek for
inputs from |
W.Q |
Only valid when |
W.g |
Only valid when |
Q.SL.library |
SuperLearner libraries for outcome model |
g.SL.library |
SuperLearner libraries for exposure model |
k_split |
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., |
g.bound |
Value between [0,1] at which the propensity score should be truncated. Defaults to 0.025. |
stratified_fit |
An indicator for whether the outcome model is fitted stratified by exposure status in the |
A fitted AIPW
object with summarised results
library(SuperLearner) aipw_sl <- aipw_wrapper(Y=rbinom(100,1,0.5), A=rbinom(100,1,0.5), W.Q=rbinom(100,1,0.5), W.g=rbinom(100,1,0.5), Q.SL.library="SL.mean",g.SL.library="SL.mean", k_split=1,verbose=FALSE)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.