Skip to content

Commit

Permalink
Change start_params to None in call to GLM.fit_constrained used to ge…
Browse files Browse the repository at this point in the history
…t automatic priors (#265)

* Change start_params to None in GLM.fit_constrained

* Black format

* Omit start_params. It is None by default

* Update changelog
  • Loading branch information
tomicapretto committed Nov 3, 2020
1 parent 8e0bb71 commit 512792c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* Include missing files for sdist (#204)
* Fixed if-else comparison that prevented HalfTStudent prior from being used (#205)
* Sidestep plotting flat priors in `plot_priors()` (#258)
* GLM.fit_constrained in automatic priors now uses start_params = None (#265)

### Documentation
* Update example notebooks (#232)
Expand Down
4 changes: 1 addition & 3 deletions bambi/priors.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,7 @@ def _get_slope_stats(self, exog, predictor, sigma_corr, full_mod=None, points=4)
null = [
GLM(
endog=self.model.y.data, exog=exog, family=self.model.family.smfamily()
).fit_constrained(
str(exog.columns[i]) + "=" + str(val), start_params=full_mod.params.values
)
).fit_constrained(str(exog.columns[i]) + "=" + str(val))
for val in values[:-1]
]
null = np.append(null, full_mod)
Expand Down

0 comments on commit 512792c

Please sign in to comment.