postmk | R Documentation |
Marginal probability of m1,m2,m3,...,mk+1
postmk(w, M, Y, K, cluster, sigma2, clusteri)
w |
A scalar representing the minimum number of points in each interval between two change points |
M |
A scalar representing the number of points available for each data sequence |
Y |
A matrix M x N with the data sequences |
K |
A vector containing the number of change points for each cluster (or its initial values) |
cluster |
A vector containing the cluster assignments for the data sequences (or its initial values) |
sigma2 |
A vector with the variances of the data sequences (or its initial values) |
clusteri |
A scalar with the index of a cluster |
A numerical vector of size k + 1 with the sampled number of observations (or bin size, mk) between each change point for a given cluster
This function is called within the Gibbs sampler, but it can also be called separately.
data(data)
postmk(w = 10, M = 50, Y = data, K = c(1, 1), cluster = c(2,1,1,1,1), sigma2 = apply(data, 2, var),
clusteri = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.