Skip to contents

With \(y = \alpha + \beta p + u\), an instrument \(z\) with \(cov(z, u) = 0\) and \(cov(z, p) \neq 0\) gives \(\beta = cov(z, y) / cov(z, p)\) (Research.P8.Instrument.wald_identifies); without relevance every slope yields the same instrument covariance (wald_undefined).

Usage

morie_wald_iv(y, p, z)

Arguments

y

Outcome.

p

The sanction dimension to be instrumented.

z

The instrument.

Value

A list with beta, cov_zy, cov_zp, relevant and alpha (the intercept from the means).

Examples

set.seed(3)
z <- rbinom(200, 1, 0.5); p <- 0.3 + 0.4 * z + rnorm(200, sd = 0.1)
y <- 1 - 2 * p + rnorm(200, sd = 0.2)
morie_wald_iv(y, p, z)$beta
#> [1] -1.993345