-
-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/issue-3107 add beta negative binomial lpmf #3108
Feature/issue-3107 add beta negative binomial lpmf #3108
Conversation
Jenkins Console Log Machine informationNo LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.3 LTS Release: 20.04 Codename: focalCPU: G++: Clang: |
@lingium not a review itself, but wanted to chime in to say super nice work so far! It's no small feat to have a PR pass CI on the first try; I hardly do myself even now. Nice meeting you at StanCon, and glad you're contributing to Stan! |
Hey @WardBrian, thanks for your support! It was a pleasure meeting you at StanCon as well. I'm glad to be contributing to Stan :) |
3e3f6c5
to
11ba289
Compare
Seems like I forgot to pull pre-commit hook's commit to local |
May have to require your approval to one of the workflows to continue |
Jenkins Console Log Machine informationNo LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.3 LTS Release: 20.04 Codename: focalCPU: G++: Clang: |
Jenkins Console Log Machine informationNo LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.3 LTS Release: 20.04 Codename: focalCPU: G++: Clang: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Will github let you press the merge button? If not I can, though we use to be able to let contributors click the button themselves which imo feels nice
Thanks for the review @SteveBronder! From my side it says merging is blocked, so please go ahead from your end |
@lingium check your email. You should have received an invite to the stan org and with that I believe you will be able to click the merge button :) |
Hi @SteveBronder, got the invite. I was tagged as a collaborator now but don't seem to have merge pr permission |
@lingium maybe now? |
Yes, it's working now! |
@lingium are you also interested in adding this to the compiler yourself, or would you prefer another developer do that part? It's easy enough for me to do if you want to provide a list of signatures you'd expect support for |
@WardBrian could you help me to add this time? Cuz it's super easy for you. Here's list of signatures
Another thing is, we would prefer small PRs, right? If so for the cdf, lcdf, lccdf, and rng, I will submit in different PRs. |
I’ll take a look at that today! And yes, it is easiest if they are each in their own PR. If I remember correctly from Stan Con, isn’t there also an alternative parameterization you are interested in? |
Thanks Brian! Yes, there is an alternative parameterization. It becomes |
Summary
With this PR the lpmf of beta negative binomial distribution are added.
See issue #3107
Expressions involved:
PMF
Partial derivatives w.r.t the three parameters
Tests
Test is written follow the guide.
Side Effects
No.
Release notes
beta_neg_binomial_lpmf
is available if merged. Allows modeling heavy-tail count data.Checklist
Copyright holder: Zhi Ling
The copyright holder is typically you or your assignee, such as a university or company. By submitting this pull request, the copyright holder is agreeing to the license the submitted work under the following licenses:
- Code: BSD 3-clause (https://opensource.org/licenses/BSD-3-Clause)
- Documentation: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/)
the basic tests are passing
./runTests.py test/unit
)make test-headers
)make test-math-dependencies
)make doxygen
)make cpplint
)the code is written in idiomatic C++ and changes are documented in the doxygen
the new changes are tested