Created
January 22, 2016 15:08
-
-
Save takoika/cbd4d13b9106f512cca5 to your computer and use it in GitHub Desktop.
Stan code for inferring probability of m-face dice.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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