| kdbwselect | R Documentation |
kdbwselect implements bandwidth selectors for kernel density point estimators and inference procedures developed in Calonico, Cattaneo and Farrell (2018). See also Calonico, Cattaneo and Farrell (2022) for related optimality results.
It also implements other bandwidth selectors available in the literature.
Companion commands are: kdrobust for kernel density point estimation and inference procedures.
A detailed introduction to this command is given in Calonico, Cattaneo and Farrell (2019). For more details and related software useful for empirical analysis, visit https://nppackages.github.io/.
kdbwselect(x, eval = NULL, neval = NULL, kernel = "epa",
bwselect = "mse-dpi", bwcheck=21, imsegrid=30, subset = NULL, data = NULL)
x |
independent variable. |
eval |
vector of evaluation point(s). By default it uses 30 quantile-spaced points (deciles 0.1 to 0.9 in equal steps) over the support of |
neval |
number of quantile-spaced evaluation points on the support of |
kernel |
kernel function used to construct the kernel estimators. Options are |
bwselect |
bandwidth selection procedure to be used. Options are:
Note: MSE = Mean Square Error; IMSE = Integrated Mean Squared Error; CE = Coverage Error; DPI = Direct Plug-in; ROT = Rule-of-Thumb. For details on implementation see Calonico, Cattaneo and Farrell (2019). |
bwcheck |
if a positive integer is provided, then the selected bandwidth is enlarged so that at least |
imsegrid |
number of evaluations points used to compute the IMSE bandwidth selector. Default is |
subset |
optional rule specifying a subset of observations to be used. |
data |
an optional data frame. When supplied, |
bws |
A matrix containing |
bws.imse |
IMSE-optimal bandwidths returned when |
opt |
A list containing options passed to the function. |
Sebastian Calonico, University of California, Davis, CA. scalonico@ucdavis.edu.
Matias D. Cattaneo, Princeton University, Princeton, NJ. matias.d.cattaneo@gmail.com.
Max H. Farrell, University of California, Santa Barbara, CA. mhfarrell@gmail.com.
Calonico, S., M. D. Cattaneo, and M. H. Farrell. 2018. On the Effect of Bias Estimation on Coverage Accuracy in Nonparametric Inference. Journal of the American Statistical Association, 113(522): 767-779. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1080/01621459.2017.1285776")}.
Calonico, S., M. D. Cattaneo, and M. H. Farrell. 2019. nprobust: Nonparametric Kernel-Based Estimation and Robust Bias-Corrected Inference. Journal of Statistical Software, 91(8): 1-33. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.18637/jss.v091.i08")}.
Calonico, S., M. D. Cattaneo, and M. H. Farrell. 2022. Coverage Error Optimal Confidence Intervals for Local Polynomial Regression. Bernoulli, 28(4): 2998-3022.
kdrobust
x <- rnorm(500)
est <- kdbwselect(x)
summary(est)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.