Skip to content

Commit

Permalink
BUG: GLMResults.summary fix use_t closes statsmodels#1829
Browse files Browse the repository at this point in the history
  • Loading branch information
josef-pkt committed Jul 16, 2014
1 parent 34a86d0 commit f4ca2b4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions statsmodels/base/tests/test_generic_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ def test_ftest_pvalues(self):
for k in range(k_vars)]
assert_allclose(pvals, res.pvalues, rtol=5e-10, atol=1e-25)

# label for pvalues in summary
string_use_t = 'P>|z|' if use_t is False else 'P>|t|'
summ = str(res.summary())
assert_(string_use_t in summ)
summ = str(res.summary())
assert_(string_use_t in summ)


# TODO The following is not (yet) guaranteed across models
Expand Down
2 changes: 1 addition & 1 deletion statsmodels/genmod/generalized_linear_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1046,7 +1046,7 @@ def summary(self, yname=None, xname=None, title=None, alpha=.05):
smry.add_table_2cols(self, gleft=top_left, gright=top_right, # [],
yname=yname, xname=xname, title=title)
smry.add_table_params(self, yname=yname, xname=xname, alpha=alpha,
use_t=True)
use_t=self.use_t)

if hasattr(self, 'constraints'):
smry.add_extra_txt(['Model has been estimated subject to linear '
Expand Down

0 comments on commit f4ca2b4

Please sign in to comment.