Skip to content

Commit

Permalink
Correctly display f-test, j-test in summary.
Browse files Browse the repository at this point in the history
  • Loading branch information
mlondschien committed Oct 3, 2024
1 parent 6230b70 commit ff9899c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ivmodels/summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,14 +199,14 @@ def fit(self, X, y, Z=None, C=None, *args, **kwargs):
self.f_statistic_, self.f_p_value_ = (
tests.rank_test(Z, X, C=C, fit_intercept=fit_intercept)
if self.kclass._is_iv_estimator()
else None
), None
else (None, None)
)

self.j_statistic_, self.j_p_value_ = (
tests.j_test(Z, X, y=y, C=C, fit_intercept=fit_intercept)
if self.kclass._is_iv_estimator() and Z.shape[1] > X.shape[1]
else None
), None
else (None, None)
)

return self

Expand Down

0 comments on commit ff9899c

Please sign in to comment.