#!/usr/bin/env python
# coding: utf-8
# # 2019-03-06 Scratch
#
#
# ## The Weak Instruments Problem
#
# Suppose: $ y = {\beta}x + u $; $ x = {\pi}z + v $; $ u = {\delta}v + w $
#
# then:
#
# $ {\beta}_{IV} = \frac{zy}{zx} = \frac{{\beta}xz + uz}{xz} $
#
# $ {\beta}_{IV} = \frac{{\beta}{\pi}zz + {\beta}vz + uz}{{\pi}zz + vz} = \beta + \frac{uz}{{\pi}zz + vz}$
#
# $ {\beta}_{IV} = \beta + \frac{{\delta}vz + wz}{{\pi}zz + vz} = \beta + {\delta}\frac{1}{({\pi}zz/(vz)) + 1} + \frac{wz}{{\pi}zz + vz} $
#
# And if $ \pi = 0 $, then:
#
# $ {\beta}_{IV0} = \beta + \frac{{\delta}vz + wz}{vz} = \beta + \delta + \frac{wz}{vz} $
#
# This is the weak instruments problem. As you get more and more data, $ \frac{wz}{vz} $ is not heading for zero, and even if it were your estimated $ {\beta}_{IV0} $ is not headed for $ \beta $ but is rather headed for $ \beta + \delta $
#
# Now we would like to apply a file-drawer problem filter: $ \pi $ is zero, but in the sample you have the calculated $ zv $ is large enough that you are happy to run and report the regression. What can we then say?
#
# ----
#
#