postalpha0 | R Documentation |
Posterior for alpha0
postalpha0(alpha0, a, b, N, cluster)
alpha0 |
A scalar defining the parameter for the Dirichlet process prior that controls the number of clusters (or its initial values) |
a |
The hyperparameter value for the shape parameter in the gamma prior for alpha0 |
b |
The hyperparameter value for the scale parameter in the gamma prior for alpha0 |
N |
A scalar representing the number of data sequences |
cluster |
A vector containing the cluster assignments for the data sequences (or its initial values) |
A numerical value corresponding to a sample from the posterior of alpha0
This function is called within the Gibbs sampler, but it can be called seperately.
postalpha0(alpha0 = 1/100, a = 2, b = 1000, N = 5, cluster = c(1,1,2,1,1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.