Log in from a computer to take this course

You'll need to log in from a computer to start Learn the Basics of Causal Inference with R. But you can practice or keep up your coding streak with the Codecademy Go app. Download the app to get started.

apple storegoogle store
Learn

Congratulations on finishing this lesson on instrumental variable estimation! We covered a lot of topics:

  • Instrumental variable (IV) estimation is a causal inference technique that can be used to estimate a causal treatment effect even in the presence of unobserved confounding variables.
  • IV estimation can be used in non-randomized studies when compliance with the assigned or encouraged treatment is not perfect.
  • An instrument is a variable that is related to an outcome of interest ONLY through the treatment variable.
  • The four assumptions of IV estimation are relevance, exclusion, exchangeability, and monotonicity.
  • IV estimation is performed via two-stage least squares (2SLS) regression.
  • The ivreg() function in the AER package performs 2SLS regression and automatically provides corrected standard errors of the treatment effect.

Instructions

Conclusion:

Great job! The 2SLS regression model using the email campaign as an instrument produced a CACE estimate of 38.056 (as shown in the learning environment). As long as our assumptions hold, this means that using video streaming services increased spending by an average of about 38 dollars. Since this is the CACE, it only applies to compliers: those who used the streaming services because they received the email, but who would not have used streaming otherwise.

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?