Skip to content

Commit

Permalink
Merge 4bf93a7 into 22aaef4
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrockmendel committed May 24, 2019
2 parents 22aaef4 + 4bf93a7 commit c139f43
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions statsmodels/genmod/tests/test_glm_weights.py
Expand Up @@ -244,11 +244,9 @@ def setup_class(cls):
nobs = len(cpunish_data.endog)
aweights = fweights / wsum * nobs

# This is really close when corr_fact = (wsum - 1.) / wsum, but to
# avoid having loosen precision of the assert_allclose, I'm doing this
# manually. Its *possible* lowering the IRLS convergence criterion
# in stata and here will make this less sketchy.
cls.corr_fact = np.sqrt((wsum - 1.) / wsum) * 0.98518473599905609
# Note: corr_fact here matches one of the two ways it can be defined
# in test_sandwich_cov.
cls.corr_fact = np.sqrt((nobs - 1.) / nobs)
mod = GLM(cpunish_data.endog, cpunish_data.exog,
family=sm.families.Poisson(),
var_weights=aweights)
Expand Down

0 comments on commit c139f43

Please sign in to comment.