# NOT RUN {
my_population <- declare_population(N = 500, noise = rnorm(N))
my_potential_outcomes <- declare_potential_outcomes(
Y_Z_0 = noise, Y_Z_1 = noise +
rnorm(N, mean = 2, sd = 2))
my_assignment <- declare_assignment()
my_estimand <- declare_estimand(ATE = mean(Y_Z_1 - Y_Z_0))
my_estimator <- declare_estimator(Y ~ Z, estimand = my_estimand)
my_reveal <- declare_reveal()
design <- my_population +
my_potential_outcomes +
my_estimand +
my_assignment +
my_reveal +
my_estimator
# }
# NOT RUN {
simulations <- simulate_design(designs, sims = 2)
diagnosis <- diagnose_design(simulations_df = simulations)
# }
# NOT RUN {
# }
# NOT RUN {
# A fixed population with simulations over assignment only
head(simulate_design(design, sims = c(1, 1, 1, 100, 1)))
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab