LPCDE
The lpcde Python package implements local polynomial conditional distribution and density estimation with bandwidth selection.
lpcde: local polynomial conditional CDF, PDF, and derivative estimation with pointwise and uniform inference quantities.lpbwcde: rule-of-thumb bandwidth selection for local polynomial conditional density estimation.
Website: https://nppackages.github.io/lpcde/.
Source code: https://github.com/nppackages/lpcde.
Authors
Matias D. Cattaneo (matias.d.cattaneo@gmail.com)
Rajita Chandak (rajita.chandak@gmail.com)
Michael Jansson (michael.jansson.berkeley@gmail.com)
Xinwei Ma (xinweima.pku@gmail.com)
Installation
To install locally from the repository:
pip install -e Python/lpcde
Usage
import numpy as np
from lpcde import confint, lpbwcde, lpcde, plot, summary, vcov
x_data = np.random.normal(size=500)
y_data = np.random.normal(loc=x_data, scale=1)
y_grid = np.linspace(-1, 1, 5)
fit = lpcde(x_data=x_data, y_data=y_data, y_grid=y_grid, x=0, bw=0.5)
bw = lpbwcde(y_data=y_data, x_data=x_data, x=0, y_grid=y_grid)
summary(fit)
confint(fit)
Replication examples are available in replication/lpcde_illustration.py and replication/lpcde_replication.py.
Dependencies
- numpy
- pandas
- scipy
- matplotlib
References
Software and Implementation
- Cattaneo, Chandak, Jansson and Ma (2025): lpcde: Estimation and Inference for Local Polynomial Conditional Density Estimators.
Journal of Open Source Software 10(107): 7241.
Technical and Methodological
- Cattaneo, Chandak, Jansson and Ma (2024): Boundary Adaptive Local Polynomial Conditional Density Estimators.
Bernoulli 30(4): 3193-3223.
Metadata
Release files for lpcde 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lpcde-1.0.0.tar.gz | 15.4 kB | With provenance | Details for lpcde-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lpcde-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for lpcde-1.0.0-py3-none-any.whl |
Total release size: 29.0 kB
Release files / lpcde-1.0.0.tar.gz
| Download URL | lpcde-1.0.0.tar.gz |
|---|---|
| Size | 15.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
820b6576b2f87b34cbdbeb9f1ad8409c980aa19242bd4298be583471b210aa58
|
|
BLAKE2b-256 checksum How to use checksums |
bc9ca13ac8206e45b9e312f3b9ab4ce8f3a44390e0dd4a9e32f0f1898010ca6a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 21, 2026.
Transparency logRelease files / lpcde-1.0.0-py3-none-any.whl
| Download URL | lpcde-1.0.0-py3-none-any.whl |
|---|---|
| Size | 13.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0d4584eb9aed9af8c692bb8a6c696ad8bc1d345e3e01f14148b9b785b9c9ea32
|
|
BLAKE2b-256 checksum How to use checksums |
7b77c5848b67ad8a6d638999a71b8f86dd7a9aaec954e1680617c771ed269ec0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 21, 2026.
Transparency logSecurity for lpcde 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for lpcde-1.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 21, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.