Description Usage Arguments Value Author(s) References See Also Examples
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/.
1 2 3 4 |
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. |
Estimate |
A matrix containing |
opt |
A list containing options passed to the function. |
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.
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.
1 2 3 4 | x <- runif(500)
y <- sin(4*x) + rnorm(500)
est <- lpbwselect(y,x)
summary(est)
|
Call: lpbwselect
Sample size (n) = 500
Polynomial order for point estimation (p) = 1
Order of derivative estimated (deriv) = 0
Polynomial order for confidence interval (q) = 2
Kernel function = Epanechnikov
Bandwidth method = mse-dpi
=======================================
eval h b
=======================================
1 0.000 0.224 0.386
2 0.035 0.361 0.374
3 0.069 0.294 0.363
4 0.103 0.214 0.407
5 0.137 0.189 0.487
---------------------------------------
6 0.172 0.180 0.777
7 0.206 0.184 0.973
8 0.240 0.187 1.172
9 0.275 0.188 0.865
10 0.309 0.192 1.157
---------------------------------------
11 0.343 0.189 1.330
12 0.377 0.183 1.498
13 0.412 0.179 0.818
14 0.446 0.184 0.883
15 0.480 0.186 1.323
---------------------------------------
16 0.515 0.187 1.837
17 0.549 0.192 0.882
18 0.583 0.200 0.799
19 0.618 0.197 1.559
20 0.652 0.185 0.948
---------------------------------------
21 0.686 0.173 2.598
22 0.720 0.170 1.138
23 0.755 0.171 1.214
24 0.789 0.176 0.832
25 0.823 0.180 1.621
---------------------------------------
26 0.858 0.232 0.539
27 0.892 0.249 0.455
28 0.926 0.292 0.425
29 0.960 1.002 0.414
30 0.995 0.301 0.442
---------------------------------------
=======================================
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.