Fuzzy RDD treatment effect via instrumented Wald ratio
Usage
morie_rdd_fuzzy(
data,
outcome,
running,
treatment,
cutoff = 0,
bandwidth = NULL,
p = 1,
kernel = "triangular",
alpha = 0.05
)Arguments
- data
A
data.frameholding the outcome, running variable, treatment, and any covariates referenced by name.- outcome
Character; column name of the response variable in
data.- running
Character; column name of the running (forcing) variable in
data.- treatment
Character; column name of the treatment-receipt variable (fuzzy designs).
- cutoff
Numeric scalar; the threshold on
running. Default0(the canonical normalisation).- bandwidth
Numeric; the local-polynomial bandwidth on each side of the cutoff.
NULLinvokes the data-driven CCT selector.- p
Integer; local-polynomial order (default 1 for local- linear). 2 picks up quadratic curvature for bias correction.
- kernel
One of
"triangular"(default),"epanechnikov","uniform", or"gaussian".- alpha
Significance level (default
0.05).
Value
A named list with elements estimate, std_error, t_stat, p_value, ci_lower, ci_upper, n_obs, method, details.
Examples
set.seed(34)
n <- 1000
x <- runif(n, -1, 1)
tr <- as.integer(xor(x >= 0, rbinom(n, 1, 0.1) == 1))
y <- 0.3 * x + 1.5 * tr + rnorm(n, sd = 0.5)
d <- data.frame(y, x, tr)
res <- morie_rdd_fuzzy(d, outcome = "y", running = "x",
treatment = "tr", cutoff = 0)
res$estimate
#> [1] 1.431063
