| rdhte_lincom | R Documentation |
rdhte_lincom computes point estimates, p-values, and
robust bias-corrected confidence intervals for linear combinations of
parameters after any estimation using rdhte
(Calonico, Cattaneo, Farrell, Palomba and Titiunik, 2025a).
Inference is implemented using robust bias-correction methods
(Calonico, Cattaneo, and Titiunik, 2014). It is based on the R function
glht.
Companion commands: rdhte for estimation and inference of RD-HTE
and rdbwhte for data-driven bandwidth selection.
A detailed introduction to the software is given in Calonico, Cattaneo, Farrell, Palomba and Titiunik (2025b).
Related software packages for analysis and interpretation of RD designs and related methods are available in: https://rdpackages.github.io/.
For background methodology, see Calonico, Cattaneo, Farrell, and Titiunik (2019), Calonico, Cattaneo and Farrell (2020), and Cattaneo and Titiunik (2022).
rdhte_lincom(model, linfct, level = 95, digits = 3)
model |
a fitted model returned by |
linfct |
a specification of the linear hypotheses to be tested. Linear functions can be specified by either the matrix of coefficients or by symbolic descriptions of one or more linear hypotheses. |
level |
Confidence level for intervals (percentage form, in |
digits |
Number of decimal places to format numeric outputs (default 3). |
A list with two data frames:
individualOne row per hypothesis. Columns: hypothesis, estimate (conventional point estimate of the linear combination), z_stat (asymptotic z-statistic from the bias-corrected fit), p_value (two-sided p-value from the standard normal), conf.low, conf.high (robust bias-corrected CI bounds at the requested confidence level).
jointOne row. Columns: statistic (Wald chi-squared from the bias-corrected fit), df (number of restrictions), p_value.
Numeric columns are rounded to digits decimal places.
Sebastian Calonico, University of California, Davis scalonico@ucdavis.edu.
Matias D. Cattaneo, Princeton University matias.d.cattaneo@gmail.com.
Max H. Farrell, University of California, Santa Barbara mhfarrell@gmail.com.
Filippo Palomba, Princeton University filippo.palomba19@gmail.com.
Rocio Titiunik, Princeton University rocio.titiunik@gmail.com.
Calonico, Cattaneo, Farrell, Palomba and Titiunik (2025): rdhte: 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.
Cattaneo and Titiunik. 2022. Regression Discontinuity Designs. Annual Review of Economics, 14: 821-851.
Calonico, Cattaneo, and Farrell. 2020. Optimal Bandwidth Choice for Robust Bias Corrected Inference in Regression Discontinuity Designs. Econometrics Journal, 23(2): 192-210.
Calonico, Cattaneo, Farrell, and Titiunik. 2019. Regression Discontinuity Designs using Covariates. Review of Economics and Statistics, 101(3): 442-451.
Calonico, Cattaneo, and Titiunik. 2014a. Robust Nonparametric Confidence Intervals for Regression-Discontinuity Designs. Econometrica 82(6): 2295-2326.
Granzier, Pons, and Tricaud. 2023. Coordination and Bandwagon Effects: How Past Rankings Shape the Behavior of Voters and Candidates. American Economic Journal: Applied Economics, 15(4): 177-217.
rdhte, rdbwhte
set.seed(123)
n <- 1000
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)
m1 <- rdhte(y = Y, x = X, covs.hte = factor(W))
linfct <- c("`factor(W)0` - `factor(W)1` = 0")
rdhte_lincom(model = m1, linfct = linfct)
## Not run:
data(rdhte_dataset)
with(rdhte_dataset, {
rd_ideology <- rdhte(y = y, x = x, covs.hte = factor(w_ideology),
cluster = cluster_var)
rdhte_lincom(rd_ideology,
linfct = c("`factor(w_ideology)4` - `factor(w_ideology)3` = 0",
"`factor(w_ideology)4` = 0"))
})
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.