mrd_sens_cutoff: Cutoff Sensitivity Simulation for Multivariate Regression...

View source: R/mrd_sens_cutoff.R

mrd_sens_cutoffR Documentation

Cutoff Sensitivity Simulation for Multivariate Regression Discontinuity

Description

mrd_sens_cutoff refits the supplied model with varying cutoff(s). All other aspects of the model, such as the automatically calculated bandwidth, are held constant.

Usage

mrd_sens_cutoff(object, cutoffs)

Arguments

object

An object returned by mrd_est or mrd_impute.

cutoffs

A two-column numeric matrix of paired cutoff values to be used for refitting an mrd object. The first column corresponds to cutoffs for x1 and the second column corresponds to cutoffs for x2.

Value

mrd_sens_cutoff returns a dataframe containing the estimate est and standard error se for each pair of cutoffs (A1 and A2) and for each model. A1 contains varying cutoffs for assignment 1 and A2 contains varying cutoffs for assignment 2. The model column contains the approach (either centering, univariate 1, or univariate 2) for determining the cutoff and the parametric model (linear, quadratic, or cubic) or non-parametric bandwidth setting (Imbens-Kalyanaraman 2012 optimal, half, or double) used for estimation.

References

Imbens, G., Kalyanaraman, K. (2012). Optimal bandwidth choice for the regression discontinuity estimator. The Review of Economic Studies, 79(3), 933-959. https://academic.oup.com/restud/article/79/3/933/1533189.

Examples

set.seed(12345)
x1 <- runif(5000, -1, 1)
x2 <- rnorm(5000, 10, 2)
cov <- rnorm(5000)
y <- 3 + 2 * x1 + 1 * x2 + 3 * cov + 10 * (x1 >= 0) + 5 * (x2 >= 10) + rnorm(5000)
# front.bw arugment was supplied to speed up the example
# users should choose appropriate values for front.bw
mrd <- mrd_est(y ~ x1 + x2 | cov,
               cutpoint = c(0, 10), t.design = c("geq", "geq"), front.bw = c(1,1,1))
mrd_sens_cutoff(mrd, expand.grid(A1 = seq(-.5, .5, length.out = 3), A2 = 10))

rddapp documentation built on April 6, 2023, 1:15 a.m.