Closed MarkShrime closed 4 years ago
Sorry if this is confusing.
To sample from a Dirichlet distribution you can define a parameter (e.g. called dirichlet
) with an expression: Dir([1,5,4],~)
. The first argument supplies the row vector of alphas []
, and the second argument ~
says that you want to sample from the distribution.
To get a value from this parameter (which is a random vector) you reference a particular index of the vector. For example, dirichlet[0]
would return the first value, dirichlet[1]
would return the second value, etc.
Hope this helps!
Thanks, Zach!
Added to FAQ and linked to Distributions page
Apologies if this is a simple question.
Amua appears to support a Dirichlet distribution, but the instructions on its use are unclear. Two issues:
Dir(1,5,4,~) Dir([1,5,4],~) Dir({1,5,4},~) Dir([[1,5,4,]],~) Dir(vector(1,5,4),~)