Skip to content

Commit

Permalink
fix smf test formula
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthiasSchmidtblaicherQC committed Jan 9, 2024
1 parent ab3d86f commit 80316c1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/glm/test_glm.py
Original file line number Diff line number Diff line change
Expand Up @@ -3121,7 +3121,8 @@ def test_formula_against_smf(get_mixed_data, formula, fit_intercept):
else:
beta_formula = model_formula.coef_

model_smf = smf.glm(formula, data, family=sm.families.Gaussian()).fit()
formula_smf = formula + "- 1" if not fit_intercept else formula
model_smf = smf.glm(formula_smf, data, family=sm.families.Gaussian()).fit()

np.testing.assert_almost_equal(beta_formula, model_smf.params)

Expand Down

0 comments on commit 80316c1

Please sign in to comment.