qnj | R Documentation |
Mixing probability for getting assigned to an existing cluster
qnj(N, M, as, bs, Yn, alpha, cluster, Tl, K)
N |
A scalar representing the number of data sequences |
M |
A scalar representing the number of points available for each data sequence |
as |
The hyperparameter value for the shape parameter in the inverse-gamma prior for the variance component |
bs |
The hyperparameter value for the scale parameter in the inverse-gamma prior for the variance component |
Yn |
A vector or matrix with data sequences for a cluster |
alpha |
A list containing a vector for each cluster determining the constant level values for each interval between change points in each cluster (or its initial values) |
cluster |
A vector containing the cluster assignments for the data sequences (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) |
K |
A vector containing the number of change points for each cluster (or its initial values) |
A vector of same size as the vector 'cluster' corresponding to the mixing term value used to compute the probability that the given data sequence 'Yn' should be part of each existing cluster
This function is called within the Gibbs sampler. It should not be called alone.
[gibbs_alg()]
qnj(N = 5, M = 50, as = 2, bs = 1000, Yn = data[,1], alpha = c(10, 10),
cluster = c(1,1,2,1,2), Tl = c(50,50), K = c(0,0))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.