Skip to content

Instantly share code, notes, and snippets.

@takoika
Created January 22, 2016 15:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save takoika/cbd4d13b9106f512cca5 to your computer and use it in GitHub Desktop.
Save takoika/cbd4d13b9106f512cca5 to your computer and use it in GitHub Desktop.
Stan code for inferring probability of m-face dice.
data
{
int <lower=0> m; // The number of dice faces
int <lower=0> x[m]; // The numbers of events. x[i] indicates the number of occurence of i-th face.
}
parameters
{
simplex[m] theta; // Occurence probabilities.
}
model
{
x ~ multinomial(theta);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment