Simple causal inference techniques
Having covered EDA in R, which provided us with a solid understanding of our data’s structure and characteristics, we now transition to implementing causal inference models in R. This shift marks a crucial progression from data exploration to the rigorous analysis of causal relationships.
Comparing means (t-tests)
Causal inference determines whether a change or intervention, such as moving houses, causes an effect, such as a change in grades. It’s important to ensure the effect isn’t due to other factors or chance. A t-test is commonly used for causal inference. It compares the average (mean) of an outcome, such as grades, before and after an intervention. This test checks whether the intervention, such as moving, significantly impacts the outcome. For instance, comparing grades before and after moving can reveal whether the move significantly affected academic performance.
Building the model
In a paired t-test such...