Kernel Density and Local Polynomial Regression Methods

Estimation, inference, bandwidth selection, and graphical procedures for kernel density and local polynomial regression methods, including robust bias-corrected confidence intervals as described in Calonico, Cattaneo and Farrell (2018, ). The package includes 'lprobust()' for local polynomial point estimation and robust bias-corrected inference, 'lpbwselect()' for local polynomial bandwidth selection, 'kdrobust()' for kernel density point estimation and robust bias-corrected inference, 'kdbwselect()' for kernel density bandwidth selection, and 'nprobust.plot()' for plotting results. The main methodological and numerical features are described in Calonico, Cattaneo and Farrell (2019, ).


Kernel Density and Local Polynomial Regression Methods

The package nprobust implements estimation, inference, bandwidth selection, and graphical procedures for kernel density and local polynomial regression methods, including robust bias-corrected confidence intervals.

  • lprobust(): local polynomial point estimation and robust bias-corrected inference.
  • lpbwselect(): data-driven bandwidth selection for local polynomial regression.
  • kdrobust(): kernel density point estimation and robust bias-corrected inference.
  • kdbwselect(): data-driven bandwidth selection for kernel density estimation.
  • nprobust.plot(): graphical presentation of lprobust() and kdrobust() results.

See references for methodological and practical details.

Website: https://nppackages.github.io/.

Source code: https://github.com/nppackages/nprobust.

Authors

Sebastian Calonico ([email protected])

Matias D. Cattaneo ([email protected])

Max H. Farrell ([email protected])

Installation

To install/update use R:

install.packages("nprobust")

Usage

library(nprobust)

# Cholesterol trial data used by the Python and Stata examples.
data <- read.csv("../nprobust_data.csv")
control <- data$t == 0

# Local polynomial regression with robust bias-corrected confidence intervals.
result <- lprobust(data$cholf[control], data$chol1[control])
summary(result)

# Data-driven bandwidth selection.
bw <- lpbwselect(data$cholf[control], data$chol1[control],
                 bwselect = "mse-dpi", neval = 7)
summary(bw)

# Kernel density estimation.
density <- kdrobust(data$chol1[control], neval = 30)
summary(density)

# Kernel density bandwidth selection.
summary(kdbwselect(data$chol1[control], bwselect = "imse-dpi"))

# Plot a local polynomial fit.
nprobust.plot(result, xlabel = "chol1", ylabel = "cholf")

Dependencies

  • ggplot2

References

For overviews and introductions, see nppackages website.

Software and Implementation

Technical and Methodological

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("nprobust")

1.0.0 by Sebastian Calonico, 5 months ago


https://github.com/nppackages/nprobust


Report a bug at https://github.com/nppackages/nprobust/issues


Browse source code at https://github.com/cran/nprobust


Authors: Sebastian Calonico [aut, cre] , Matias D. Cattaneo [aut] , Max H. Farrell [aut]


Documentation:   PDF Manual  


GPL-3 license


Imports ggplot2

Suggests testthat, broom, sandwich


Imported by DIDHAD, rdlearn.

Suggested by tidyhte.


See at CRAN