Estimation Diagnostics
Start Here
Install and environment setup: Installation & Replication
Core estimator objectives: Estimators for Sequential and Simultaneous Nested NPIV
Canonical diagnostics API and math details: Universal Diagnostics API
Post-estimation inference context: Semiparametric Estimation
On This Page
Overview
NNPIV includes estimator-agnostic diagnostics under nnpiv.diagnostics.
These diagnostics are optional and non-invasive: they do not modify estimator
objectives, but help characterize whether a DGP appears favorable for nested
sequential vs simultaneous estimation before fitting models, and (optionally)
how severe relative conditioning is on the realized first-stage error
direction after estimation.
Assumptions
Data blocks are row-aligned for \((A, C, C')\) diagnostics and optional \(e_g\) post-estimation checks.
Diagnostics are finite-dimensional approximations over chosen feature maps (for example RFF or polynomial sieves).
Conditioning conclusions are empirical and should be read jointly with sieve-size and stabilization paths.
Notation
\(\kappa\): pre-estimation relative well-posedness diagnostic.
\(\kappa_{\mathrm{eff}}\): post-estimation diagnostic along error direction \(e_g = \hat{g} - g_0\).
\(\eta\): stabilization level in generalized-eigenvalue computations.
Progressive Recipe
# Step 1: prepare nested NPIV blocks
from nnpiv.diagnostics import relative_wellposedness_from_nested_npiv
# Step 2: run diagnostic A
out = relative_wellposedness_from_nested_npiv(
A=A,
D=C_prime,
B=B,
C=C,
feature_map="rff",
n_features=300,
eta=1e-6,
random_state=123,
)
# Step 3: inspect key outputs
print(out["kappa"], out["nullspace_violation_flag"], out["unstable_flag"])
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