moderndid.NPIVResult#
- class moderndid.NPIVResult(h: ndarray, h_lower: ndarray | None, h_upper: ndarray | None, deriv: ndarray, h_lower_deriv: ndarray | None, h_upper_deriv: ndarray | None, beta: ndarray, asy_se: ndarray, deriv_asy_se: ndarray, cv: float | None, cv_deriv: float | None, residuals: ndarray, j_x_degree: int, j_x_segments: int, k_w_degree: int, k_w_segments: int, args: dict)[source]#
Bases:
NamedTupleContainer for nonparametric instrumental variables estimation results.
- Attributes:
- h
numpy.ndarray Estimated structural function \(\hat{h}_J(x)\) at evaluation points.
- h_lower
numpy.ndarrayorNone Lower uniform confidence band for \(h_0\).
- h_upper
numpy.ndarrayorNone Upper uniform confidence band for \(h_0\).
- deriv
numpy.ndarray Estimated derivative \(\partial^a \hat{h}_J(x)\) at evaluation points.
- h_lower_deriv
numpy.ndarrayorNone Lower uniform confidence band for \(\partial^a h_0\).
- h_upper_deriv
numpy.ndarrayorNone Upper uniform confidence band for \(\partial^a h_0\).
- beta
numpy.ndarray Sieve coefficient vector \(\hat{c}_J\).
- asy_se
numpy.ndarray Pointwise asymptotic standard errors \(\hat{\sigma}_J(x)\).
- deriv_asy_se
numpy.ndarray Pointwise asymptotic standard errors \(\hat{\sigma}_J^a(x)\) for derivatives.
- cv
floatorNone Bootstrap critical value \(z_{1-\alpha}^*\) for function UCBs.
- cv_deriv
floatorNone Bootstrap critical value \(z_{1-\alpha}^{a*}\) for derivative UCBs.
- residuals
numpy.ndarray TSLS residuals \(\hat{u}_{i,J} = Y_i - \hat{h}_J(X_i)\).
- j_x_degree
int Degree of B-spline basis for \(X\).
- j_x_segments
int Number of segments for \(X\) basis.
- k_w_degree
int Degree of B-spline basis for \(W\).
- k_w_segments
int Number of segments for \(W\) basis.
- args
dict Diagnostic information. When data-driven selection is used, includes
j_x_seg,k_w_seg,j_hat_max,theta_star, and other selection diagnostics from the Lepski procedure.
- h
Methods
count(value, /)Return number of occurrences of value.
index(value[, start, stop])Return first index of value.
Attributes
Diagnostic information and selection diagnostics.
Pointwise asymptotic standard errors for the structural function.
Sieve coefficient vector.
Bootstrap critical value for function uniform confidence bands.
Bootstrap critical value for derivative uniform confidence bands.
Estimated derivative at evaluation points.
Pointwise asymptotic standard errors for derivatives.
Estimated structural function at evaluation points.
Lower uniform confidence band for the structural function.
Lower uniform confidence band for the derivative.
Upper uniform confidence band for the structural function.
Upper uniform confidence band for the derivative.
Degree of B-spline basis for X.
Number of segments for X basis.
Degree of B-spline basis for W.
Number of segments for W basis.
TSLS residuals.