Learn R Programming

nprobust (version 0.0.1)

kdbwselect: Bandwidth Selection Procedures for Kernel Density Estimation

Description

kdbwselect implements bandwidth selectors for kernel density estimation and inference procedures developed in Calonico, Cattaneo and Farrell (2016a).

Companion commands are: kdrobust 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/

Usage

kdbwselect(x, c, deriv = 0, p = 2, kernel = "epan", 
bwselect = "mse", all = FALSE, subset = NULL)

Arguments

x

the data from which the estimate is to be computed.

c

specifies the evaluation point in x.

p

specifies the order of the kernel used to construct the point-estimator; default is p = 2.

deriv

specifies the order of the derivative of the density function to be estimated. Default is deriv=0.

kernel

is the kernel function used to construct the kernel density estimator(s). Options are triangular (default option), epanechnikov and uniform.

bwselect

specifies the bandwidth selection procedure to be used. Options are:

mse MSE-optimal bandwidth selector for the kernel density estimator.

cer CER-optimal bandwidth selector for the kernel density 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.

all

if specified, kdbwselect reports all available bandwidth selection procedures.

subset

an optional vector specifying a subset of observations to be used.

Value

bws

matrix containing the estimated bandwidths for each selected procedure.

bwselect

bandwidth selection procedure employed.

kernel

kernel function used to construct the kernel density estimator(s).

p

order of the kernel used to construct the point-estimator.

References

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. 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.

See Also

kdrobust

Examples

Run this code
# NOT RUN {
x<-runif(1000,-1,1)
kdbwselect(x, c=0)
# }

Run the code above in your browser using DataLab