powered by
Full conditional for alphak
postalphak(M, Y, sigma2, K, Tl, cluster, clusteri)
A numerical vector of size `K` + 1 with sampled values from the full conditional of alphak for a given cluster `clusteri`
A scalar representing the number of points available for each data sequence
A matrix M x N with the data sequences
A vector with the variances of the data sequences (or its initial values)
A vector containing the number of change points for each cluster (or its initial values)
A list containing a vector for each cluster determining the change-point positions in each cluster (or its initial values)
A vector containing the cluster assignments for the data sequences (or its initial values)
A scalar with the index of a cluster
[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)
Run the code above in your browser using DataLab