Skip to content

Commit

Permalink
Setting df floor in diagnostics
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrovma committed Sep 20, 2024
1 parent dc7e01e commit 806120a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions spreg/diagnostics.py
Original file line number Diff line number Diff line change
Expand Up @@ -1388,6 +1388,8 @@ def likratiotest(reg0, reg1):

# generalize to multiple parameters, e.g., spatial Durbin
df = reg1.k - reg0.k
if not(df > 0):
df = 1

Check warning on line 1392 in spreg/diagnostics.py

View check run for this annotation

Codecov / codecov/patch

spreg/diagnostics.py#L1390-L1392

Added lines #L1390 - L1392 were not covered by tests

#pvalue = stats.chisqprob(likr, 1)
pvalue = stats.chisqprob(likr, df)

Check warning on line 1395 in spreg/diagnostics.py

View check run for this annotation

Codecov / codecov/patch

spreg/diagnostics.py#L1395

Added line #L1395 was not covered by tests
Expand Down

0 comments on commit 806120a

Please sign in to comment.