math
math copied to clipboard
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 modelin...
## Summary This PR updates `hypergeometric_pFq` to delegate the existing specialisations (e.g., `hypergeometric_2F1`) to take advantage of their optimisations/reparameterisations. For this I had to extract the actual call to Boost's...
These will require some extra work by the user to be able to compute the cross-terms, meaning either an extra function argument or additional overloads of the UDF they provide....
This feature request would add support for the Bell distribution. The Bell distribution is suitable for count data, has a single parameter, and can model overdispersed counts. The PDF is:...
## Summary This is my take on the request #3133 I created a while ago. The Generalized normal distribution a.k.a. exponential power distribution generalizes the normal, Laplace (double exponential) and...
## Summary Fixes #3146 by making the deduction for branch logic be compile time using `if constexpr`. This also cleans up a lot of the code for `offset_multiply_constrain`. Instead of...
This is based on review by @SteveBronder in my PR https://github.com/stan-dev/math/pull/3157#discussion_r1985559090 but it apparently pertains to many other already implemented distributions as well as functions When I run the following...
Currently the only signature available is `(vector) => vector` But it's somewhat annoying when I want to do this row-wise over a matrix. (To hand-code a similar effect as `stochastic_row_matrix`...
I figured something like this could be useful (although not strictly necessary) pre-requisite for #3149 Consider rectangular matrices $A \in \mathbb{R}^{m \times n}, B \in \mathbb{R}^{n \times m}$. We can...
We already have `binomial_logit_glm` and `categorical_logit_glm` Multinomial distribution generalizes both Binomial and Categorical, is still in the exponential family and the logit (softmax) parametrization seem natural - we already have...
## Description Implement Generalized normal distribution https://en.wikipedia.org/wiki/Generalized_normal_distribution ### Why this is useful? It generalizes the normal (for p=2) and double exponential (Laplace) distribution (for p=1) and in the limit case...