The lpcde package implements bandwidth selection, point estimation, and inference procedures for local polynomial conditional distribution and density methods.
lpcde: local polynomial conditional CDF, PDF, and derivative estimation with pointwise and uniform inference.lpbwcde: rule-of-thumb bandwidth selection for local polynomial conditional density estimation.
To install/update in R type:
install.packages('lpcde')
-
Help: R Manual, CRAN repository.
-
Replication: R illustration, Python illustration, Stata illustration, software article replication, comparison illustration.
To install/update locally from this repository:
pip install lpcde
-
Help: Python README, illustration script.
-
Development usage:
from lpcde import lpcde, lpbwcde
The Python implementation mirrors the R lpcde and lpbwcde numerical paths and includes cross-language regression tests against R-generated fixtures.
To install/update in Stata type:
net install lpcde, from(https://raw.githubusercontent.com/nppackages/lpcde/main/stata) replace
-
Commands:
lpcdefor estimation and inference,lpbwcdefor bandwidth selection. -
Replication: do-file.
The Stata implementation is standalone Stata/Mata code, with numerical smoke tests intended to keep it aligned with the R and Python baselines.
- Cattaneo, Chandak, Jansson and Ma (2025): lpcde: Estimation and Inference for Local Polynomial Conditional Density Estimators.
Journal of Open Source Software 10(107): 7241.
Companion arXiv version
- Cattaneo, Chandak, Jansson and Ma (2024): Boundary Adaptive Local Polynomial Conditional Density Estimators.
Bernoulli 30(4): 3193-3223.
Supplemental appendix.
This work was supported in part by the National Science Foundation through grants SES-1947805, SES-1947662, DMS-2210561, and SES-2241575, and by the National Institutes of Health through grant R01 GM072611-16.