diff_diff.LocalLinearFit#
- class diff_diff.LocalLinearFit[source]#
Bases:
objectResult of a local-linear regression at a boundary.
- n_effective#
Count of observations with strictly positive kernel weight (within
[d0, d0 + h]for the one-sided kernels shipped here).- Type:
- residuals#
Residuals from the weighted OLS fit, in the order of the retained observations.
- Type:
np.ndarray, shape (n_effective,)
- kernel_weights#
Kernel weights
k((d_i - d0) / h). These are the pre-scaled weights; the1/hscaling cancels out of the weighted-OLS estimator (a constant factor on all weights does not change the point estimate).- Type:
np.ndarray, shape (n_effective,)
- design_matrix#
Design matrix
X = [1, d_i - d0]used in the fit. Preserved for Phase 1c bias-correction machinery.- Type:
np.ndarray, shape (n_effective, 2)
Methods
__init__(intercept, slope, n_effective, ...)Attributes
- __init__(intercept, slope, n_effective, bandwidth, kernel, boundary, residuals, kernel_weights, design_matrix)#
- classmethod __new__(*args, **kwargs)#