Skip to contents

Arithmetically identical to morie_caus_iv_late() – the two agree to machine precision, and a discrepancy would mean one is wrong. What differs is the assumption set and therefore what the number is ABOUT: Z -> D -> Y with no Z -> Y arrow (exclusion), no common cause of Z and Y (exchangeability), and Z moving D (relevance). With a CONSTANT treatment effect that graph identifies the average treatment effect; without it, the compliers' effect.

Usage

morie_caus_iv_dag(y, D, Z, homogeneous = FALSE)

Arguments

y

outcome.

D

binary treatment.

Z

binary instrument.

homogeneous

assert a constant treatment effect.

Value

list: beta, se, estimand, homogeneous_asserted, relevance, relevance_t, relevance_p, assumptions, testable, untestable, n, method.

Details

homogeneous records which claim is being made, since the number is the same either way. It defaults to FALSE so the weaker, safer reading is what comes out unless constancy is asserted deliberately. Only relevance is testable, and it is reported.

References

Imbens and Angrist (1994), Econometrica 62:467-475; Angrist, Imbens and Rubin (1996), JASA 91:444-455.

Examples

set.seed(1)
Z <- stats::rbinom(400, 1, 0.5)
D <- Z * stats::rbinom(400, 1, 0.7)
morie_caus_iv_dag(2 * D + stats::rnorm(400), D, Z)$relevance
#> [1] 0.6994536