I am currently reading about the two-arm experiment in the DeclareDesign library. I realize that this is probably a very basic question, but I’m honestly confused about declaration of the population
and potential_outcomes
code:
population <- declare_population(N = N, u_0 = rnorm(N), u_1 = rnorm(n = N,
mean = rho * u_0, sd = sqrt(1 - rho^2)))
potential_outcomes <- declare_potential_outcomes(Y ~ (1 -
Z) * (u_0 * control_sd + control_mean) + Z * (u_1 * treatment_sd +
treatment_mean))
Here are my questions:
- For defining the population, I’m confused about why we need
rho
at all. What does this do? I just thought that the code would ensure theu_0
andu_1
are the same like whenrho
= 1 (not sure why we wouldn’t wantu_0
andu_1
to be the same). This is what I thought this code would look like:
population <- declare_population(N = N,
u_0 = rnorm(N), # Take mean = 0, sd = 1
u_1 = u_0) # Make sure u_0 and u_1 are the same
- For
potential_outcomes
, I’m somewhat confused about this piece of the code:u_0 * control_sd + control_mean
and this pieceu_1 * treatment_sd + treatment_mean
. What is this code trying to accomplish? I feel like I need a better grasp so I can adjust it in future designs.
Thanks in advance for the help!