Tools for estimation and inference of conditional densities, derivatives and functions. This is the companion software for Cattaneo, Chandak, Jansson and Ma (2024)
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: CRAN repository.
Replication: R-script, software article replication, comparison illustration, Python illustration, Stata illustration.
Development version:
devtools::install_github('nppackages/lpcde/R/lpcde')
Basic usage:
model1 <- lpcde::lpcde(x_data = x_data, y_data = y_data,
y_grid = y_grid, x = 0, bw = 1)
model2 <- lpcde::lpbwcde(y_data = y_data, x_data = x_data,
x = 0, y_grid = y_grid)
Standard R methods including coef, confint, plot, print, summary, and vcov are available for fitted lpcde objects. The summary, print, and coef methods are available for lpbwcde bandwidth-selection objects.
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.