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...
This issue is to collect information from https://github.com/stan-dev/math/pull/3203 in one place. Basic summary: On GCC, since c71dd3e (#2642), both `./test/prob/poisson/poisson_ccdf_log_00000_generated_v_test` and `./test/prob/loglogistic/loglogistic_cdf_00001_generated_ffv_test` fail due to taking a reference to something...
Moving part of the discussion from embedded Laplace doc PR https://github.com/stan-dev/docs/pull/874 From issue #3065 > Going the other way, we can also provide a simplified interface where the likelihood is...
Branched off of #3200, just trying to see about recreating #3203 in our CI
The safety checks in the current implementations of `categorical_logit_rng` and `multinomial_logit_rng` are too strict. The doc says `categorical(softmax(x))` is the same as `categorical_logit(x)`, but that's not the case because `softmax`...
## Summary @avehtari reported on slack that he had one of these errors raise on a model. I've not yet been able to re-create locally, but it would be nice...
Now that we're requiring C++17, cleaning up these `forward_as` workarounds throughout the codebase would be nice. This is also described in the [Stan Math Developer docs](https://mc-stan.org/math/md_doxygen_2contributor__help__pages_2common__pitfalls.html#title9): > If we used...
Caught by https://jenkins.flatironinstitute.org/blue/organizations/jenkins/Stan%2FBleedingEdgeCompilersMonthly/detail/BleedingEdgeCompilersMonthly/259/pipeline The issue seems to be specific to `fvar`. c.f. #3006, though note that this is a _runtime_ failure, not a compile failure. cc @SteveBronder @andrjohns Details ```...
In the [code](https://github.com/stan-dev/math/blob/develop/stan/math/prim/prob/dirichlet_lpdf.hpp#L106C12-L106C22) there is currently: ```cpp const auto& theta_log = to_ref_if::value>(theta_dbl.log()); if (include_summand::value) { lp += (theta_log * alpha_m_1).sum(); } ``` I understand that by the convention (and also...
I'm preparing the docs for the sum-to-zero matrix and it's essentially a nested version of the 1-d sum-to-zero constraint. I thought that there must be an easier way to generalize...
#### Summary: Implement functions that will look like this in Stan: ``` // to_matrix(rv)[i, j] = rv[i, j] matrix to_matrix(row_vector[] rv); // to_matrix(v)[i, j] = v[j, i] matrix to_matrix(vector[] x);...