This package provides the implementation of estimating and conducting valid inference on the covariate-adjusted regression function (or the dose-response curve in causal inference) and its derivative through the proposed integral estimator and a localized derivative estimator in [1]. It also implements the regression adjustment (RA), inverse probability weighting (IPW) and doubly robust (DR) estimators of the dose-response curve and its derivative function with and without the positivity condition in [2]. All the code for simulations and real-world applications in our papers are documented in Paper 1 and Paper 2.
- Free software: MIT license
- Python Package Documentation: https://npdoseresponse.readthedocs.io.
- We also provide an R package npDoseResponse for those estimators in [1], though the Python package will be numerically stabler.
npDoseResponse
requires Python 3.8+ (earlier version might be applicable) and NumPy. To install the latest version of npDoseResponse
from this repository, run:
python setup.py install
To pip install a stable release, run:
pip install npDoseResponse
[1] Y. Zhang, Y.-C. Chen, and A. Giessing (2024+) Nonparametric Inference on Dose-Response Curves Without the Positivity Condition arXiv:2405.09003.
[2] Y. Zhang and Y.-C. Chen (2025+) Doubly Robust Inference on Causal Derivative Effects for Continuous Treatments arXiv:2501.06969.