Repeated {AIPW}R Documentation

Repeated Crossfitting Procedure for AIPW

Description

An R6Class that allows repeated crossfitting procedure for an AIPW object

Details

See examples for illustration.

Value

AIPW object

Constructor

Repeated$new(aipw_obj = NULL)

Constructor Arguments

Argument Type Details
aipw_obj AIPW object an AIPW object

Public Methods

Methods Details Link
repfit() Fit the data to the AIPW object num_reps times repfit.Repeated
summary_median() Summary (median) of estimates from the repfit() summary_median.Repeated

Public Variables

Variable Generated by Return
repeated_estimates repfit() A data.frame of estiamtes form num_reps cross-fitting
repeated_results summary_median() A list of sumarised estimates
result summary_median() A data.frame of sumarised estimates

Public Variable Details

repeated_estimates

Estimates from num_reps cross-fitting.

result

Summarised estimates from “repeated_estimates' using median methods.

References

Zhong Y, Kennedy EH, Bodnar LM, Naimi AI (2021). AIPW: An R Package for Augmented Inverse Probability Weighted Estimation of Average Causal Effects. American Journal of Epidemiology.

Robins JM, Rotnitzky A (1995). Semiparametric efficiency in multivariate regression models with missing data. Journal of the American Statistical Association.

Chernozhukov V, Chetverikov V, Demirer M, et al (2018). Double/debiased machine learning for treatment and structural parameters. The Econometrics Journal.

Kennedy EH, Sjolander A, Small DS (2015). Semiparametric causal inference in matched cohort studies. Biometrika.

Examples

library(SuperLearner)
library(ggplot2)

#create an object
aipw_sl <- AIPW$new(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=2,verbose=FALSE)

#create a repeated crossfitting object from the previous step
repeated_aipw_sl <- Repeated$new(aipw_sl)

#fit repetitively (stratified = TRUE will use stratified_fit() method in AIPW class)
repeated_aipw_sl$repfit(num_reps = 3, stratified = FALSE)

#summarise the results
repeated_aipw_sl$summary_median()


[Package AIPW version 0.6.9.2 Index]