Repository navigation
FEA add Tweedie log likelihood - #8281
lorentzenchr wants to merge 2 commits into
Conversation
|
Hello @lorentzenchr! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2022-05-16 10:21:19 UTC |
| ) | ||
|
|
||
| if not self.eql: | ||
| if p < 1 or p > 2: |
There was a problem hiding this comment.
shouldn't this apply to both methods? i.e. be before if not self.eql:
|
@lorentzenchr Thanks for the PR I'm trying to get this into 0.14 within the next few days. |
| idx = endog > 0 | ||
| if np.any(idx): | ||
| if not np.isscalar(endog): | ||
| endog = endog[idx] |
There was a problem hiding this comment.
this raises a broad casting error below,
ll_obs is full nobs length
This loglike is used by default in summary and raises exception.
I guess lin 1678 should be
ll_obs[idx] += np.log(1/endog * wb)
|
merged in #8560 |
closesaddresses Add Tweedie distribution: likelihood, pdf and sampling methods #7310NumPy's guide.
This PR adds the Tweedie log-likelihood for
1 < p < 2to theTweediefamiliy class.