-
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
exposed dirichlet_multinomial distribution
- Loading branch information
Showing
5 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
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
21 changes: 21 additions & 0 deletions
21
...distributions/multivariate/discrete/dirichlet_multinomial/dirichlet_multinomial_lpmf.stan
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
data { | ||
int d_int; | ||
array[d_int] int d_int_array; | ||
vector[d_int] d_vector; | ||
} | ||
transformed data { | ||
real transformed_data_real; | ||
transformed_data_real = dirichlet_multinomial_lpmf(d_int_array | d_vector); | ||
} | ||
parameters { | ||
vector[d_int] p_vector; | ||
real y_p; | ||
} | ||
transformed parameters { | ||
real transformed_param_real; | ||
transformed_param_real = dirichlet_multinomial_lpmf(d_int_array | d_vector); | ||
transformed_param_real = dirichlet_multinomial_lpmf(d_int_array | p_vector); | ||
} | ||
model { | ||
y_p ~ normal(0, 1); | ||
} |
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
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
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