lpbwselect {nprobust} | R Documentation |
Bandwidth Selection Procedures for Local Polynomial Regression Estimation and Inference
Description
lpbwselect
implements bandwidth selectors for local polynomial regression point estimators and inference procedures developed in Calonico, Cattaneo and Farrell (2018). See also Calonico, Cattaneo and Farrell (2020) for related optimality results.
It also implements other bandwidth selectors available in the literature. See Wand and Jones (1995) and Fan and Gijbels (1996) for background references.
Companion commands: lprobust
for local polynomial point estimation and inference procedures.
A detailed introduction to this command is given in Calonico, Cattaneo and Farrell (2019). For more details, and related Stata and R packages useful for empirical analysis, visit https://nppackages.github.io/.
Usage
lpbwselect(y, x, eval = NULL, neval = NULL, p = NULL, deriv = NULL,
kernel = "epa", bwselect = "mse-dpi", bwcheck = 21, bwregul = 1,
imsegrid = 30, vce = "nn", cluster = NULL,
nnmatch = 3, interior = FALSE, subset = NULL)
Arguments
y |
dependent variable. |
x |
independent variable. |
eval |
vector of evaluation point(s). By default it uses 30 equally spaced points over to support of |
neval |
number of quantile-spaced evaluation points on support of |
p |
polynomial order used to construct point estimator; default is |
deriv |
derivative order of the regression function to be estimated. Default is |
kernel |
kernel function used to construct local polynomial 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 |
bwregul |
specifies scaling factor for the regularization term added to the denominator of bandwidth selectors. Setting |
imsegrid |
number of evaluations points used to compute the IMSE bandwidth selector. Default is |
vce |
procedure used to compute the variance-covariance matrix estimator. Options are:
|
cluster |
indicates the cluster ID variable used for cluster-robust variance estimation with degrees-of-freedom weights. By default it is combined with |
nnmatch |
to be combined with for |
.
interior |
if TRUE, all evaluation points are assumed to be interior points. This option affects only data-driven bandwidth selection via |
subset |
optional rule specifying a subset of observations to be used. |
Value
Estimate |
A matrix containing |
opt |
A list containing options passed to the function. |
Author(s)
Sebastian Calonico, Columbia University, New York, NY. sebastian.calonico@columbia.edu.
Matias D. Cattaneo, Princeton University, Princeton, NJ. cattaneo@princeton.edu.
Max H. Farrell, University of Chicago, Chicago, IL. max.farrell@chicagobooth.edu.
References
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. 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. doi: 10.18637/jss.v091.i08.
Calonico, S., M. D. Cattaneo, and M. H. Farrell. 2020. Coverage Error Optimal Confidence Intervals for Local Polynomial Regression. Working Paper.
Fan, J., and Gijbels, I. 1996. Local polynomial modelling and its applications, London: Chapman and Hall.
Wand, M., and Jones, M. 1995. Kernel Smoothing, Florida: Chapman & Hall/CRC.
See Also
Examples
x <- runif(500)
y <- sin(4*x) + rnorm(500)
est <- lpbwselect(y,x)
summary(est)