rdhte | R Documentation |
rdhte
provides estimation and inference for heterogeneous
treatment effects in RDD using local polynomial regression
allowing for interactions with pretreatment covariates.
Inference is implemented using robust bias-correction methods.
Companion commands: rdbwhte
for data-driven bandwidth selection.
Related Stata and R packages useful for inference in RD designs are described in the website: https://rdpackages.github.io/.
rdhte(
y,
x,
c = 0,
covs.hte = NULL,
covs.eff = NULL,
p = 1,
kernel = "tri",
h = NULL,
vce = "hc3",
cluster = NULL,
level = 95,
bw.joint = FALSE
)
y |
Outcome variable. |
x |
Running variable. |
c |
Cutoff value (default = 0). |
covs.hte |
Covariate(s) for heterogeneous treatment effects (required). |
covs.eff |
Additional covariates for efficiency (optional). |
p |
Polynomial order (default = 1). |
kernel |
Kernel type (default = "tri"). |
h |
Choice of bandwidth (optional). |
vce |
Variance estimator (default = "hc3"). |
cluster |
Optional cluster variable. |
level |
Confidence level (default = 95). |
bw.joint |
Logical, use joint bandwidth selection (default = FALSE). |
A list with selected RD HTE effects and model information.
Estimate |
vector of conventional local-polynomial RD estimates. |
Estimate_bc |
vector of bias-corrected local-polynomial RD estimates. |
se_rb |
vector containing robust bias corrected standard errors of the local-polynomial RD estimates. |
ci_rb |
matrix containing robust bias corrected confidence intervals. |
t_rb |
vector containing the t-statistics associated with robust local-polynomial RD estimates. |
pv_rb |
vector containing the p-values associated with robust local-polynomial RD estimates. |
coefs |
vector containing the coefficients for the jointly estimated p-th order local polynomial model. |
vcov |
estimated variance-covariance matrix. |
W_lev |
vector of group level identifiers. |
kernel |
kernel type used. |
vce |
variance estimator used. |
c |
cutoff value. |
h |
vector containing the bandwidths used. |
p |
order of the polynomial used for estimation of the regression function. |
N |
vector with the original number of observations for each group. |
Nh |
vector with the effective number of observations for each group. |
coef_report |
internal value. |
level |
confidence level used. |
rdmodel |
rd model. |
Sebastian Calonico, University of California, Davis scalonico@ucdavis.edu.
Matias D. Cattaneo, Princeton University cattaneo@princeton.edu.
Max H. Farrell, University of California, Santa Barbara maxhfarrell@ucsb.edu.
Filippo Palomba, Princeton University fpalomba@princeton.edu.
Rocio Titiunik, Princeton University titiunik@princeton.edu.
Calonico, Cattaneo, Farrell, Palomba and Titiunik (2025): rdhte: Learning Conditional Average Treatment Effects in RD Designs. Working paper.
Calonico, Cattaneo, Farrell, Palomba and Titiunik (2025): Treatment Effect Heterogeneity in Regression Discontinuity Designs. Working paper
rdbwhte
set.seed(123)
n <- 5000
X <- runif(n, -1, 1)
W <- rbinom(n, 1, 0.5)
Y <- 3 + 2*X + 1.5*X^2 + 0.5*X^3 + sin(2*X) + 3*W*(X>=0) + rnorm(n)
rdhte.1 = rdhte(y=Y, x=X, covs.hte=factor(W))
summary(rdhte.1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.