W2hatmu0referenceDRcoveragesim1000.r implements IPW, outcome regression and DR estimators for the simulation study when both models are correctly specified.

W2hatmu0referenceDRcrossfittingcoveragesim1000.r implements the cross fitting estimators for the simulation study when both models are correctly specified.

W2hatmu0referencesmoothsplinecoveragesim1000.r implements the data adaptive doubly robust estimator for Scenario 1, where both the propensity score model and the outcome regression model are linear functions of X.

W2hatmu0referencenonparametricsmoothsplinecoveragesim1000.r implements the data adaptive cross fitting estimator for Scenario 2, where both the propensity score model and the outcome regression model are nonlinear functions of X.

W2hatmu0referencesmoothsplinecrossfittingcoveragesim1000piece1.r implements the data adaptive cross fitting estimator for Scenario 1, where both the propensity score model and the outcome regression model are linear functions of X.

W2hatmu0referencenonparametricsmoothsplinecrossfittingcoveragesim1000piece1.r implements the data adaptive cross fitting estimator for Scenario 2, where both the propensity score model and the outcome regression model are nonlinear functions of X.

dataanalysis.r implements the real data application in the paper.