stan-dev / math

The Stan Math Library is a C++ template library for automatic differentiation of any order using forward, reverse, and mixed modes. It includes a range of built-in functions for probabilistic modeling, linear algebra, and equation solving.
https://mc-stan.org
BSD 3-Clause "New" or "Revised" License
752 stars 188 forks source link

Generalised Hypergeometric (pFq) function #2509

Open andrjohns opened 3 years ago

andrjohns commented 3 years ago

Description

One of the pre-requisites for implementing the inverse-CDF (quantile) of the Gamma distribution is the hypergeometric 2F2 function, which is needed for the gradients.

The gradients are the same for the 2F2 and the generalised pFq, so may as well implement the more generalised version

Current Version:

v4.1.0

sethaxen commented 1 year ago

Was this completed by #2510?

sethaxen commented 1 year ago

Also @andrjohns is this the last major prerequisite for implementing the Gamma quantile and its derivative?

nikunj410 commented 1 year ago

Hi @andrjohns, I am working on the N-mixture model to estimate abundance from count data. The model relies on the hypergeometric_2F2 and hypergeometric_3F2 functions. Has/will these functions be implemented/exposed in stan?

Thank you