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 <- 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
rhoat all. What does this do? I just thought that the code would ensure the
u_1are the same like when
rho= 1 (not sure why we wouldn’t want
u_1to 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
potential_outcomes, I’m somewhat confused about this piece of the code:
u_0 * control_sd + control_meanand this piece
u_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!