Nested Nonparametric Instrumental Variable Regression
Overview
This package aims to solve or estimate nonparametrically nested moment conditions. We analyze the closed form or approximate solutions under different function classes for the following estimators:
Estimators
NPIV
Given set of observations \((Y, A, C')_i\); we want to estimate nonparametrically \(g\) in \(\mathbb{E}\left[Y | C'\right]= \mathbb{E}\left[g(A) | C'\right]\), where A is the set of endogenous variables, and C’ the set of instruments. We solve the inverse problem adversarially:
and we also consider norm regularization instead of ridge regularization:
Nested NPIV
Whenever we have the set of observations \((Y, A, B, C, C')_i\); and want to solve the system:
we estimate \(g\) and \(h\) by solving:
and similarly when using norm-regularization.
Implementation
Longitudinal Estimation
This package implements longitudinal estimation of functions \(g\) and \(h\) for several function classes:
RKHS
Random Forest
Neural Networks
Sparse Linear
Linear
Semiparametric Estimation
The package also implements debiased machine learning for estimation of a functional of the nuisance longitudinal parameter \(g\) or \(h\):
based on constructing orthogonal moments for:
Mediation analysis
Long term effect
Contents
- Home
- Installation & Replication
- Estimators for Sequential and Simultaneous Nested NPIV
- Overview
- Assumptions
- Notation
- Estimator Objectives
- Progressive Recipe
- Estimator Families
- Related Pages
- Estimation Diagnostics
- Overview
- Assumptions
- Notation
- Progressive Recipe
- Canonical Diagnostics Reference
- Universal Diagnostics API
- Assumptions
- Notation
- Diagnostic A: Relative Well-posedness
- Growing-sieve diagnostic (J and eta paths)
- Post-estimation error-direction diagnostic (kappa_eff)
- Post-estimation sieve path (kappa_eff by J and eta)
- Availability and workflow
- Plug-and-play usage with dataset blocks
- Canonical nested NPIV shortcut
- Universal Diagnostics API
- Related Pages
- Semiparametric Estimation
- API Documentation
- Overview
- Longitudinal Estimator APIs
- Longitudinal API Overview
- RKHS Estimators
- nnpiv.rkhs.RKHSIV
- nnpiv.rkhs.RKHSIVCV
- nnpiv.rkhs.ApproxRKHSIV
- nnpiv.rkhs.ApproxRKHSIVCV
- nnpiv.rkhs.RKHSIVL2
- nnpiv.rkhs.RKHSIVL2CV
- nnpiv.rkhs.ApproxRKHSIVL2
- nnpiv.rkhs.ApproxRKHSIVL2CV
- nnpiv.rkhs.RKHS2IV
- nnpiv.rkhs.RKHS2IVCV
- nnpiv.rkhs.RKHS2IVL2
- nnpiv.rkhs.RKHS2IVL2CV
- nnpiv.rkhs.ApproxRKHS2IV
- nnpiv.rkhs.ApproxRKHS2IVCV
- nnpiv.rkhs.ApproxRKHS2IVL2
- nnpiv.rkhs.ApproxRKHS2IVL2CV
- Ensemble and Random Forest Estimators
- Neural Network Estimators
- Sparse and Regularized Linear Estimators
- TSLS Baselines
- RKHS Estimators
- Longitudinal API Overview
- Diagnostics APIs
- Semiparametric APIs
- Related Pages
Note
This project is under active development; see [MezaSingh2025] for theory background.
References
- MezaSingh2025
Meza, I., & Singh, R. (2025). Nested Nonparametric Instrumental Variable Regression. https://doi.org/10.48550/arXiv.2112.14249