lpbwselect implements bandwidth selectors for local polynomial regression point estimators and inference procedures developed in Calonico, Cattaneo and Farrell (2016a).
Companion commands are: lprobust for point estimation and inference procedures.
For more details, and related Stata and R packages useful for empirical analysis, visit https://sites.google.com/site/rdpackages/
lpbwselect(y, x, c, p = 1, q = 2,
deriv = 0, kernel = "epa", bwselect = "mse", scaleregul = 1,
vce = "nn", nnmatch = 3, all = FALSE, subset = NULL)is the dependent variable.
is the independent variable).
specifies the evaluation point in x.
specifies the order of the local-polynomial used to construct the point-estimator; default is p = 1 (local linear regression).
specifies the order of the local-polynomial used to construct the bias-correction; default is q = 2 (local quadratic regression).
specifies the order of the derivative of the regression functions to be estimated. Default is deriv=0.
is the kernel function used to construct the local-polynomial estimator(s). Options are triangular (default option), epanechnikov and uniform.
specifies the bandwidth selection procedure to be used. Options are:
mse MSE-optimal bandwidth selector for the local polynomial regression estimator.
cer CER-optimal bandwidth selector for the local polynomial regression estimator.
Note: MSE = Mean Square Error; CER = Coverage Error Rate.
Default is bwselect=mse. For details on implementation see Calonico, Cattaneo and Farrell (2016a), and the companion software articles.
specifies scaling factor for the regularization term added to the denominator of the bandwidth selectors. Setting scaleregul = 0 removes the regularization term from the bandwidth selectors; default is scaleregul = 1.
specifies the procedure used to compute the variance-covariance matrix estimator. Options are:
nn for heteroskedasticity-robust nearest neighbor variance estimator with nnmatch the (minimum) number of neighbors to be used.
hc0 for heteroskedasticity-robust plug-in residuals variance estimator without weights.
hc1 for heteroskedasticity-robust plug-in residuals variance estimator with hc1 weights.
hc2 for heteroskedasticity-robust plug-in residuals variance estimator with hc2 weights.
hc3 for heteroskedasticity-robust plug-in residuals variance estimator with hc3 weights.
Default is vce=nn.
to be combined with for vce=nn for heteroskedasticity-robust nearest neighbor variance estimator with nnmatch indicating the minimum number of neighbors to be used. Default is nnmatch=3
if specified, lpbwselect reports all available bandwidth selection procedures.
an optional vector specifying a subset of observations to be used.
matrix containing the estimated bandwidths for each selected procedure.
bandwidth selection procedure employed.
kernel function used to construct the local-polynomial estimator(s).
order of the local-polynomial used to construct the point-estimator.
order of the local-polynomial used to construct the bias-correction estimator.
Calonico, S., M. D. Cattaneo, and M. H. Farrell. 2016. On the Effect of Bias Estimation on Coverage Accuracy in Nonparametric Inference. Working Paper. http://www-personal.umich.edu/~cattaneo/papers/Calonico-Cattaneo-Farrell_2016_JASA.pdf.
Calonico, S., M. D. Cattaneo, M. H. Farrell, and R. Titiunik. 2016a. Regression Discontinuity Designs using Covariates. Working Paper. http://www-personal.umich.edu/~cattaneo/papers/Calonico-Cattaneo-Farrell-Titiunik_2016_wp.pdf.
Calonico, S., M. D. Cattaneo, M. H. Farrell, and R. Titiunik. 2016b. rdrobust: Software for Regression Discontinuity Designs. Working Paper. http://www-personal.umich.edu/~cattaneo/papers/Calonico-Cattaneo-Farrell-Titiunik_2016_Stata.pdf.
Calonico, S., M. D. Cattaneo, and R. Titiunik. 2014a. Robust Nonparametric Confidence Intervals for Regression-Discontinuity Designs. Econometrica 82(6): 2295-2326. http://www-personal.umich.edu/~cattaneo/papers/Calonico-Cattaneo-Titiunik_2014_ECMA.pdf.
Calonico, S., M. D. Cattaneo, and R. Titiunik. 2014b. Robust Data-Driven Inference in the Regression-Discontinuity Design. Stata Journal 14(4): 909-946. http://www-personal.umich.edu/~cattaneo/papers/Calonico-Cattaneo-Titiunik_2014_Stata.pdf.
Calonico, S., M. D. Cattaneo, and R. Titiunik. 2015b. rdrobust: An R Package for Robust Nonparametric Inference in Regression-Discontinuity Designs. R Journal 7(1): 38-51. http://www-personal.umich.edu/~cattaneo/papers/Calonico-Cattaneo-Titiunik_2015_R.pdf.
# NOT RUN {
x<-runif(1000,-1,1)
y<-5+3*x+rnorm(1000)
lpbwselect(y,x, c=0)
# }
Run the code above in your browser using DataLab