What is the ints
type used the example code in the Stan Functions Reference document. One place it appears is:
https://mc-stan.org/docs/2_28/functions-reference/poisson.html
I’ve tried using it myself when specifying a Stan model, but it doesn’t appear to be valid Stan code.
Is it just a synonym for an array of integers (int[]
)?
ints means that both int
and int[]
arrray are supported. The full list of supported signatures for the poisson_lpmf function is:
poisson_lpmf(int, real) => real
poisson_lpmf(int, vector) => real
poisson_lpmf(int, row_vector) => real
poisson_lpmf(int, array[] real) => real
poisson_lpmf(array[] int, real) => real
poisson_lpmf(array[] int, vector) => real
poisson_lpmf(array[] int, row_vector) => real
poisson_lpmf(array[] int, array[] real) => real
So this is just a shorthand so that we dont need to write eight signatures in the documentation. reals
similarlly mean that real
, real[]
, vector
and row_vector
are supported.
You can use my web app to check for exact lists of signatures supported: Stan supported functions and signatures
3 Likes