postalphak | R Documentation |
Full conditional for alphak
postalphak(M, Y, sigma2, K, Tl, cluster, clusteri)
M |
A scalar representing the number of points available for each data sequence |
Y |
A matrix M x N with the data sequences |
sigma2 |
A vector with the variances of the data sequences (or its initial values) |
K |
A vector containing the number of change points for each cluster (or its initial values) |
Tl |
A list containing a vector for each cluster determining the change-point positions in each cluster (or its initial values) |
cluster |
A vector containing the cluster assignments for the data sequences (or its initial values) |
clusteri |
A scalar with the index of a cluster |
A numerical vector of size 'K' + 1 with sampled values from the full conditional of alphak for a given cluster 'clusteri'
This function is called within the Gibbs sampler, but it can be called separately as well.
[gibbs_alg()]
data(data)
postalphak(M = 50, Y = data, sigma2 = 0.05, K = c(0, 0), Tl = c(50, 50),
cluster = c(1,1,2,1,2), clusteri = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.