full_cond | R Documentation |
Full conditional for lambda
full_cond(kstar, lambda, cluster, al, bl, K, N)
kstar |
A scalar with the number maximum of change points in all clusters |
lambda |
A scalar defining the parameter for the Truncate Poisson distribution that controls the number of change points (or its initial values) |
cluster |
A vector containing the cluster assignments for the data sequences (or its initial values) |
al |
The hyperparameter value for the shape parameter in the gamma prior for lambda |
bl |
The hyperparameter value for the scale parameter in the gamma prior for lambda |
K |
A vector containing the number of change points for each cluster (or its initial values) |
N |
A scalar representing the number of data sequences |
'full_cond' returns a numerical value corresponding to a sample from the full conditional for lambda
This function is used within the Gibbs sampler, it is not expected to be used alone.
# Using hypothetical values to exemplification purposes
clusters <- c(1,1,2,1,2)
full_cond(kstar = 2, lambda = 3, cluster = clusters, al = 2, bl = 1000, K = c(2, 2), N = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.