Generating Simulated Data
First, we generate our simulated data using the
data(Simulated_data)
syntax.
library(ATE.ERROR)
set.seed(1)
data(Simulated_data)
Y_star <- Simulated_data$Y_star
A <- Simulated_data$T
Z <- Simulated_data$Z
X_star <- Simulated_data$X_star
Naive Estimation of ATE
Now we use the Naive_Estimation
function.
Naive_ATE_XY <- Naive_Estimation(Y_star, A, Z, X_star)
print(Naive_ATE_XY)
#> [1] 0.09177131
The Naive_Estimation
function calculates the ATE by
ignoring the difference between {X^∗, Y^∗} and {X, Y}.