Variance-weighted Kolmogorov-Smirnov test of the testable implications of
IV validity with a binary treatment and a binary instrument (for every
closed interval B: P(Y in B, D = 1 | Z = 1) >= P(Y in B, D = 1 | Z = 0),
P(Y in B, D = 0 | Z = 0) >= P(Y in B, D = 0 | Z = 1), and P(D = 0 | Z = 1) <= P(D = 0 | Z = 0)), with the plug-in standard errors, trimming xi and
the contact-set bootstrap of Sun (2023); bootstrap draw b uses Philox
stream b of seed, as in the Python arm.
Value
List with statistic, p_value, critical_value_05, n_boot,
contact_set_size, xi, tau, T_n, method.
References
Kitagawa, T. (2015). A test for instrument validity. Econometrica 83, 2043-2063. Sun, Z. (2023). Instrument validity for heterogeneous causal effects. Journal of Econometrics 237, 105523.
Examples
z <- rep(0:1, 30)
d <- as.numeric(sin(2.7 * (0:59)) + 0.8 * z > 0.3)
y <- round(cos(1.3 * (0:59)) + d, 1)
bound_monotone_test(y, 1 - d, z, n_boot = 99)$statistic
#> [1] 2.164007
