Skip to main content

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

Technical and Methodological

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)

Source distribution for lpcde 1.0.0
File Size Uploaded
lpcde-1.0.0.tar.gz 15.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lpcde 1.0.0
File Interpreter ABI Platform
lpcde-1.0.0-py3-none-any.whl Python 3 none any Details

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 log

Release 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 log

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page