outcomes <-
data.frame(
y0 = rnorm(N, mean = 0, sd = 1),
y1 = rnorm(N, mean = tau_sp, sd = 1),
x = covariates
)
outcomes <-
outcomes %>%
dplyr::mutate(
y0 = y0 + (exp(x) - exp(1/2)) * 0.01,
y1 = y1 + (exp(x) - exp(1/2)) * 0.02,
tau = y1 - y0
)
head(outcomes)
## y0 y1 x tau
## 1 1.12382271 0.09156567 -0.6264538 -1.032257
## 2 1.10746050 -0.93119758 0.1836433 -2.038658
## 3 -0.88292883 2.59539836 -0.8356286 3.478327
## 4 0.24354150 1.58488974 1.5952808 1.341348
## 5 0.06681127 0.93898132 0.3295078 0.872170
## 6 -1.67473381 1.67224769 -0.8204684 3.346982