Implements local polynomial conditional distribution and density estimation with bandwidth selection and robust inference.
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lpcde-1.0.0.tar.gz.
File metadata
- Download URL: lpcde-1.0.0.tar.gz
- Upload date:
- Size: 15.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
820b6576b2f87b34cbdbeb9f1ad8409c980aa19242bd4298be583471b210aa58
|
|
| MD5 |
0d28ac9936f0411b95e93374fb72a900
|
|
| BLAKE2b-256 |
bc9ca13ac8206e45b9e312f3b9ab4ce8f3a44390e0dd4a9e32f0f1898010ca6a
|
Provenance
The following attestation bundles were made for lpcde-1.0.0.tar.gz:
Publisher:
publish-python.yml on nppackages/lpcde
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lpcde-1.0.0.tar.gz -
Subject digest:
820b6576b2f87b34cbdbeb9f1ad8409c980aa19242bd4298be583471b210aa58 - Sigstore transparency entry: 1591087479
- Sigstore integration time:
-
Permalink:
nppackages/lpcde@cacb6f243608866a31208e10a6015204f867d942 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/nppackages
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@cacb6f243608866a31208e10a6015204f867d942 -
Trigger Event:
push
-
Statement type:
File details
Details for the file lpcde-1.0.0-py3-none-any.whl.
File metadata
- Download URL: lpcde-1.0.0-py3-none-any.whl
- Upload date:
- Size: 13.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d4584eb9aed9af8c692bb8a6c696ad8bc1d345e3e01f14148b9b785b9c9ea32
|
|
| MD5 |
20076cbc4feee9c6ce39741632a4b91f
|
|
| BLAKE2b-256 |
7b77c5848b67ad8a6d638999a71b8f86dd7a9aaec954e1680617c771ed269ec0
|
Provenance
The following attestation bundles were made for lpcde-1.0.0-py3-none-any.whl:
Publisher:
publish-python.yml on nppackages/lpcde
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lpcde-1.0.0-py3-none-any.whl -
Subject digest:
0d4584eb9aed9af8c692bb8a6c696ad8bc1d345e3e01f14148b9b785b9c9ea32 - Sigstore transparency entry: 1591087486
- Sigstore integration time:
-
Permalink:
nppackages/lpcde@cacb6f243608866a31208e10a6015204f867d942 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/nppackages
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@cacb6f243608866a31208e10a6015204f867d942 -
Trigger Event:
push
-
Statement type: