Instrumental Variables in Python: Estimating Price Elasticity

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 มิ.ย. 2022
  • I use data from the Kathryn Graddy's analysis of the Fulton Fish Market to estimate the price elasticity of demand in that market. I explain, on a theoretical/graphical level, why standard OLS regression cannot satisfactorily estimate the demand curve or its elasticity, and explain why IV can help us to estimate the elasticity of demand.
    Kathryn Graddy's paper: www.aeaweb.org/articles?id=10...
    My Jupyter Notebook and the data are posted on GitHub: github.com/MattBirch42/Fulton...
  • ยานยนต์และพาหนะ

ความคิดเห็น • 12

  • @maximus8988
    @maximus8988 2 ปีที่แล้ว +1

    Thanks for sharing! The code and explanations helped me a lot!

    • @MattBirch
      @MattBirch  2 ปีที่แล้ว

      Glad to hear it! Good luck!

  • @spammytrashy3710
    @spammytrashy3710 ปีที่แล้ว +1

    Great explanation!

    • @MattBirch
      @MattBirch  ปีที่แล้ว

      Glad it helped! Good luck!!

  •  ปีที่แล้ว +1

    Awesome explanation and code!
    Please do more problems with Python code!
    Cheers

    • @MattBirch
      @MattBirch  ปีที่แล้ว

      I'm glad you liked it. You'll probably want to look elsewhere for Python videos, though. Mine will be coming very slowly :)

  • @redwings02
    @redwings02 4 หลายเดือนก่อน

    @MattBirch, love the video. Very useful for what I'm working on. Question though: since the R-Squared for the IV model is so low, are we still able to trust the slope coefficient and thus PED?
    How high of an R-Squared do we need to have a reliable demand curve?

    • @MattBirch
      @MattBirch  4 หลายเดือนก่อน +1

      Totally depends on context.
      The r squared can be higher than my little toy example of course!
      You can construct proper confidence intervals in an IV framework,and from there it just depends on what you need. But if you have confounding or endogeneity in your model and do normal OLS, it won't usually matter what the r squared or CI is. Because the model will give you an estimate that is biased, even with large data sets.

  • @Hecticam
    @Hecticam 7 หลายเดือนก่อน +1

    you mentioned the linear regression model is bad - accounting for just 8% of the observations, but the IV model's R2 is far worse....

    • @MattBirch
      @MattBirch  7 หลายเดือนก่อน

      It is, and it always will be. Casual inference models with observational data will always be weaker than pure prediction models.
      The reason is that the CI goal, getting an unbiased estimate of a beta, is not the same as the prediction goal of minimizing so.e sort of error term.
      In this case, we used the weather to predict price variation,and the used predicted prices in the quantity equation. The weather only predicts some of price and introduces more noise, and so the main equation has more noise in it.
      On top of that, error terms in CI models can also be greatly complicated depending on the endogenous behavior on the error term, so this video really only scratches the surface.
      But it is a start. Cheers!

  • @parthshrivastava2548
    @parthshrivastava2548 11 หลายเดือนก่อน

    Hey I had a question (slightly detailed). Was wondering if I could send you an email or something?

    • @MattBirch
      @MattBirch  11 หลายเดือนก่อน

      Can't promise much, but feel free to ask.
      Connect and message me on LinkedIn
      www.linkedin.com/in/matt-birch-phd-332a0b186