IV Probit (Rivers-Vuong control function)
Value
A named list with elements coefficients, std_errors, t_stats, p_values, ci_lower, ci_upper, variable_names, n_obs, method, details.
Examples
set.seed(1)
n <- 400
z <- rbinom(n, 1, 0.5); u <- rnorm(n)
d <- rbinom(n, 1, plogis(0.8 * z + 0.3 * u))
y <- 0.5 * d + 0.4 * u + rnorm(n, sd = 0.5)
df <- data.frame(yb = as.integer(y > median(y)), d, z)
res <- morie_iv_probit(df, "yb", "d", "z")
res$coefficients
#> (Intercept) d .cf_resid_
#> -0.4162764 0.7688627 0.2264671
