adaptive_iptw {drtmle}  R Documentation 
Compute asymptotically linear IPTW estimators with super learning for the propensity score
adaptive_iptw( W, A, Y, DeltaY = as.numeric(!is.na(Y)), DeltaA = as.numeric(!is.na(A)), stratify = FALSE, family = if (all(Y %in% c(0, 1))) { stats::binomial() } else { stats::gaussian() }, a_0 = unique(A[!is.na(A)]), SL_g = NULL, glm_g = NULL, SL_Qr = NULL, glm_Qr = NULL, returnModels = TRUE, verbose = FALSE, maxIter = 2, tolIC = 1/length(Y), tolg = 0.01, cvFolds = 1, gn = NULL, ... )
W 
A 
A 
A 
Y 
A 
DeltaY 
A 
DeltaA 
A 
stratify 
A 
family 
A 
a_0 
A vector of 
SL_g 
A vector of characters describing the super learner library to be
used for each of the propensity score regressions ( 
glm_g 
A list of characters describing the formulas to be used
for each of the propensity score regressions ( 
SL_Qr 
A vector of characters or a list describing the Super Learner library to be used for the reduceddimension outcome regression. 
glm_Qr 
A character describing a formula to be used in the call to

returnModels 
A logical indicating whether to return model fits for the propensity score and reduceddimension regressions. 
verbose 
A logical indicating whether to print status updates. 
maxIter 
A numeric that sets the maximum number of iterations the TMLE can perform in its fluctuation step. 
tolIC 
A numeric that defines the stopping criteria based on the empirical mean of the influence function. 
tolg 
A numeric indicating the minimum value for estimates of the propensity score. 
cvFolds 
A numeric equal to the number of folds to be used in
crossvalidated fitting of nuisance parameters. If 
gn 
An optional list of propensity score estimates. If specified, the
function will ignore the nuisance parameter estimation specified by

... 
Other options (not currently used). 
An object of class "adaptive_iptw"
.
iptw_tmle
A list
of point estimates and
covariance matrix for the IPTW estimator based on a targeted
propensity score.
iptw_tmle_nuisance
A list
of the final TMLE estimates
of the propensity score ($gnStar
) and reduceddimension
regression ($QrnStar
) evaluated at the observed data values.
iptw_os
A list
of point estimates and covariance matrix
for the onestep correct IPTW estimator.
iptw_os_nuisance
A list
of the initial estimates of the
propensity score and reduceddimension regression evaluated at the
observed data values.
iptw
A list
of point estimates for the standard IPTW
estimator. No estimate of the covariance matrix is provided because
theory does not support asymptotic Normality of the IPTW estimator if
super learning is used to estimate the propensity score.
gnMod
The fitted object for the propensity score. Returns
NULL
if returnModels = FALSE
.
QrnMod
The fitted object for the reduceddimension regression
that guards against misspecification of the outcome regression.
Returns NULL
if returnModels = FALSE
.
a_0
The treatment levels that were requested for computation of covariateadjusted means.
call
The call to adaptive_iptw
.
# load super learner library(SuperLearner) # simulate data set.seed(123456) n < 100 W < data.frame(W1 = runif(n), W2 = rnorm(n)) A < rbinom(n, 1, plogis(W$W1  W$W2)) Y < rbinom(n, 1, plogis(W$W1 * W$W2 * A)) # fit iptw with maxIter = 1 to run fast fit1 < adaptive_iptw( W = W, A = A, Y = Y, a_0 = c(1, 0), SL_g = c("SL.glm", "SL.mean", "SL.step"), SL_Qr = "SL.npreg", maxIter = 1 )