fabricate(
N = 10,
U = rnorm(N),
potential_outcomes(Y ~ 0.1 * Z + U)
)
# equivalently,
fabricate(
N = 10,
U = rnorm(N),
potential_outcomes(Y ~ 0.1 * Z + U,
conditions = list(Z = c(0, 1)))
)
fabricate(
N = 10,
U = rnorm(N),
potential_outcomes(Y ~ 0.1 * Z + U,
conditions = list(Z = c(1, 2, 3)))
)
fabricate(
N = 10,
U = rnorm(N),
potential_outcomes(Y ~ 0.1 * Z1 + 0.3 * Z2 + 0.5 * Z1 * Z2 + U,
conditions = list(Z1 = c(0, 1),
Z2 = c(0, 1)))
)
Run the code above in your browser using DataLab