diff --git a/6 Causal Inference/6-2 Randomized Experiments/Randomized-Experiments-Solutions.html b/6 Causal Inference/6-2 Randomized Experiments/Randomized-Experiments-Solutions.html
index 0115c8a..ce10d3d 100644
--- a/6 Causal Inference/6-2 Randomized Experiments/Randomized-Experiments-Solutions.html
+++ b/6 Causal Inference/6-2 Randomized Experiments/Randomized-Experiments-Solutions.html
@@ -23,7 +23,7 @@
-
+
@@ -3026,7 +3026,7 @@
In this lab, we are going to discuss Randomized Experiments. Causal inference methods can be used for observational data, but it is easier to first consider them in the context of randomized experiments. To begin we are going to created simulated data that we’d be unlikely to encounter in the real world where we give the same individual the treatment and then NOT give them a treatment. We’ll then calculate the “true” *Average Treatment Effect (ATE) and then show how different techniques of applying randomization will give us very close.
We will be leaning heavily on the dplyr
library, so I’d encourage you to refer the dplyr cheat sheet to refresh your memory and push your knowledge of how to use the library.
@@ -3257,10 +3257,10 @@ Causal Typesp_4 <- df_freq$prop[4] # immune
This table shows us how many individuals in our population of interest had each of four possible sets of outcomes with and without the use of AspiTyleCedrin, which we may refer to as four different causal “types”:
-- Type 1 or “doomed”: These individuals experience a migraine regardless of whether they take AspiTyleCedrin. In our population of interest there are 51509 such individuals. The proportion of these individuals out of the entire population of interest is \(p_1 \approx\) 0.437.
-- Type 2 or “causal”: These individuals experience a migraine if and only if they take AspiTyleCedrin. In our population of interest there are 471028 such individuals. The proportion of these individuals out of the entire population of interest is \(p_2 \approx\) 0.04.
-- Type 3 or “preventive”: These individuals experience a migraine if and only if they do not take AspiTyleCedrin. In our population of interest there are 40105 such individuals. The proportion of these individuals out of the entire population of interest is \(p_3 \approx\) 0.471.
-- Type 4 or “immune”: These individuals do not experience a migraine regardless of whether they take AspiTyleCedrin. In our population of interest there are 437358 such individuals. The proportion of these individuals out of the entire population of interest is \(p_4 \approx\) 0.052.
+- Type 1 or “doomed”: These individuals experience a migraine regardless of whether they take AspiTyleCedrin. In our population of interest there are 437358 such individuals. The proportion of these individuals out of the entire population of interest is \(p_1 \approx\) 0.437.
+- Type 2 or “causal”: These individuals experience a migraine if and only if they take AspiTyleCedrin. In our population of interest there are 40105 such individuals. The proportion of these individuals out of the entire population of interest is \(p_2 \approx\) 0.04.
+- Type 3 or “preventive”: These individuals experience a migraine if and only if they do not take AspiTyleCedrin. In our population of interest there are 471028 such individuals. The proportion of these individuals out of the entire population of interest is \(p_3 \approx\) 0.471.
+- Type 4 or “immune”: These individuals do not experience a migraine regardless of whether they take AspiTyleCedrin. In our population of interest there are 51509 such individuals. The proportion of these individuals out of the entire population of interest is \(p_4 \approx\) 0.052.
@@ -3291,7 +3291,7 @@ Individual-level Treatment Ef
Average Treatment Effect (ATE)
-
So, a common causal parameter of interest is the *Average Treatement Effect (ATE), which is the average difference in the pair of potential outcomes averaged over the entire population of interest (at a particular moment in time). In other words, it is just the average (or expected value) of the individual-level treatment effect.
+
So, a common causal parameter of interest is the *Average Treatment Effect (ATE), which is the average difference in the pair of potential outcomes averaged over the entire population of interest (at a particular moment in time). In other words, it is just the average (or expected value) of the individual-level treatment effect.
\[\text{ATE} = E[Y_{i1} - Y_{i0}]\]
QUESTION 2: Use the ITE
column you just added to df
to find the average treatment effect of AspiTyleCedrin on migraines in this population and assign it to the variable name ATE
.
# calculate average treatment effect for across our sample