Skip to content

Conversation

andrjohns
Copy link
Contributor

Submission Checklist

  • Builds locally
  • New functions marked with <<{ since VERSION }>>
  • Declare copyright holder and open-source license: see below

Summary

Corresponding docs PR for the newly-exposed hypergeometric functions

I've made a separate section for these, since there will be more specialisations coming - but let me know if they should be somewhere else!

Copyright and Licensing

Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company): Andrew Johnson

By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses:

@WardBrian
Copy link
Member

This should mention the size constraints on p,q (I think it's just that length(p) == length(q) - 1?)

We could also put some of the math in the "mathematical functions" appendix -- not really sure we use that all that much though

@WardBrian WardBrian requested a review from bob-carpenter March 27, 2025 19:39
@WardBrian
Copy link
Member

Going to ask @bob-carpenter if he can take a look at this

@spinkney
Copy link
Collaborator

Are these functions in the new release?

@WardBrian
Copy link
Member

@spinkney yes! so it would be nice to get this reviewed and merged in the next week

Copy link
Member

@bob-carpenter bob-carpenter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the first equation, this looks great. Intense, and I have no idea what it's useful for, but the doc looks good.


Hypergeometric functions refer to a power series of the form
\begin{equation*}
_pF_q(a_1,...,a_p;b_1,...,b_q;z) = \sum_{n=0}^\infty \frac{(a_1)_n\cdot\cdot\cdot(a_p)_n}{(b_1)_n\cdot\cdot\cdot(b_q)_n} \frac{x^n}{n!}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

z shows up on left and not on right and x shows up on right but not on left, so I think these are meant to be the same symbol.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@WardBrian WardBrian merged commit 672d33d into master Aug 27, 2025
@WardBrian WardBrian deleted the hypergeometric-functions branch August 27, 2025 14:15
@spinkney
Copy link
Collaborator

Other than the first equation, this looks great. Intense, and I have no idea what it's useful for, but the doc looks good.

Just wanted to chime in and say this is useful in constructing cdfs for some discrete distributions. These can then be used in copulas with data augmentation for the discrete margins. I'm sure that there are plenty of other use cases as well!

@bob-carpenter
Copy link
Member

Thanks, @spinkney. We're working on getting a copulas chapter into the User's Guide at which point it might be nice to add the how-to. Speaking of which, there are probably other of the tricks you have in your library that'd be useful to document in the User's Guide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants