powered by
Marginal probability of K
postK(kstar, w, M, Y, cluster, sigma2, lambda, clusteri)
A numerical value corresponding to the sampled number of change points, k, for a given cluster
A scalar with the number maximum of change points in all clusters
A scalar representing the minimum number of points in each interval between two change points
A scalar representing the number of points available for each data sequence
A matrix M x N with the data sequences
A vector containing the cluster assignments for the data sequences (or its initial values)
A vector with the variances of the data sequences (or its initial values)
A scalar defining the parameter for the Truncate Poisson distribution that controls the number of change points (or its initial values)
A scalar with the index of a cluster
[gibbs_alg()]
postK(kstar = 2, w = 10, M = 50, Y = data, cluster = c(1,1,2,1,2), sigma2 = apply(data, 2, var), lambda = 2, clusteri = 1)
Run the code above in your browser using DataLab