I am trying to define the exact distribution of a correlation, but I cannot find a built-in Stan function for the Gaussian hypergeometric function. Frankly my math is not up to snuff to understand it and write it myself. Is this built in to Stan already, or has anyone written their own version?
2 Likes
@andrjohns has worked on adding it. I believe the next release should have it.
1 Like
Thanks for the heads up! I’ll keep my eye out for it.
1 Like
Is this function available today?
Can we use this on a regular stan code? Please, share a few lines of code as example, if possible.
where “this” is
RtnT stan::math::internal::hyper_2F1_special_cases(
const Ta1 & a1, const Ta2 & a2, const Tb & b, const Tz & z
)
No —it’s in the internal namespace in C++, not something that’s exposed in Stan. You can search in our functions reference to see what we have:
1 Like