Skip to main content

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

Technical and Methodological

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lpcde-1.0.0.tar.gz (15.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lpcde-1.0.0-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

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

Hashes for lpcde-1.0.0.tar.gz
Algorithm Hash digest
SHA256 820b6576b2f87b34cbdbeb9f1ad8409c980aa19242bd4298be583471b210aa58
MD5 0d28ac9936f0411b95e93374fb72a900
BLAKE2b-256 bc9ca13ac8206e45b9e312f3b9ab4ce8f3a44390e0dd4a9e32f0f1898010ca6a

See more details on using hashes here.

Provenance

The following attestation bundles were made for lpcde-1.0.0.tar.gz:

Publisher: publish-python.yml on nppackages/lpcde

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for lpcde-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0d4584eb9aed9af8c692bb8a6c696ad8bc1d345e3e01f14148b9b785b9c9ea32
MD5 20076cbc4feee9c6ce39741632a4b91f
BLAKE2b-256 7b77c5848b67ad8a6d638999a71b8f86dd7a9aaec954e1680617c771ed269ec0

See more details on using hashes here.

Provenance

The following attestation bundles were made for lpcde-1.0.0-py3-none-any.whl:

Publisher: publish-python.yml on nppackages/lpcde

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page