anderson_rubin Module¶
- class weak_instruments.anderson_rubin.ARTestResult(ar_stat: float, p_val: float)¶
Bases:
object
- weak_instruments.anderson_rubin.ar_test(Y: ndarray, X: ndarray, Z: ndarray, b: ndarray, talk: bool = False) ARTestResult ¶
Calculates the Jackknife Anderson-Rubin test with cross-fit variance from Mikusheva and Sun (2022).
- Parameters:
Y (np.ndarray) – A 1-D numpy array of the dependent variable (N x 1).
X (np.ndarray) – A 2-D numpy array of the endogenous regressors (N x L).
Z (np.ndarray) – A 2-D numpy array of the instruments (N x K), where K > L.
b (np.ndarray) – A 1-D numpy array of the parameter values to test.
talk (bool) – If True, provides detailed output for debugging purposes. Default is False.
- Returns:
A custom result object containing the AR test statistic and p-value.
- Return type: