# lpdensity: Local Polynomial Density Estimation and Inference

**Authors:** Matias D. Cattaneo, Michael Jansson, Xinwei Ma

arXiv: 1906.06529 · 2021-02-24

## TL;DR

lpdensity is an R and Stata package that implements a boundary-adaptive local polynomial density estimator, providing accurate density estimation and inference near boundaries with minimal tuning, improving empirical analysis reliability.

## Contribution

The paper introduces a novel boundary-adaptive local polynomial density estimator with only one tuning parameter, implemented in lpdensity, enhancing density estimation accuracy at boundaries.

## Key findings

- The estimator is boundary adaptive and requires only one tuning parameter.
- The package includes variance estimation, optimal bandwidth selection, and robust inference tools.
- Monte Carlo experiments show improved performance over existing packages.

## Abstract

Density estimation and inference methods are widely used in empirical work. When the underlying distribution has compact support, conventional kernel-based density estimators are no longer consistent near or at the boundary because of their well-known boundary bias. Alternative smoothing methods are available to handle boundary points in density estimation, but they all require additional tuning parameter choices or other typically ad hoc modifications depending on the evaluation point and/or approach considered. This article discusses the R and Stata package lpdensity implementing a novel local polynomial density estimator proposed and studied in Cattaneo, Jansson, and Ma (2020, 2021), which is boundary adaptive and involves only one tuning parameter. The methods implemented also cover local polynomial estimation of the cumulative distribution function and density derivatives. In addition to point estimation and graphical procedures, the package offers consistent variance estimators, mean squared error optimal bandwidth selection, robust bias-corrected inference, and confidence bands construction, among other features. A comparison with other density estimation packages available in R using a Monte Carlo experiment is provided.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1906.06529/full.md

## Figures

18 figures with captions in the complete paper: https://tomesphere.com/paper/1906.06529/full.md

## References

17 references — full list in the complete paper: https://tomesphere.com/paper/1906.06529/full.md

---
Source: https://tomesphere.com/paper/1906.06529