qn0: Mixing probability for creating new cluster

View source: R/qn0.R

qn0R Documentation

Mixing probability for creating new cluster

Description

Mixing probability for creating new cluster

Usage

qn0(alpha0, w, N, M, bs, as, kstar, lambda, Yn)

Arguments

alpha0

A scalar defining the parameter for the Dirichlet process prior that controls the number of clusters (or its initial values)

w

A scalar representing the minimum number of points in each interval between two change points

N

A scalar representing the number of data sequences

M

A scalar representing the number of points available for each data sequence

bs

The hyperparameter value for the scale parameter in the inverse-gamma prior for the variance component

as

The hyperparameter value for the shape parameter in the inverse-gamma prior for the variance component

kstar

A scalar with the number maximum of change points in all clusters

lambda

A scalar defining the parameter for the Truncate Poisson distribution that controls the number of change points (or its initial values)

Yn

A vector or matrix with data sequences for a cluster

Value

A numerical value representing the mixing value term used to compute the probability that the given data sequence should be a singleton cluster

Note

This function is called within [gibbs_alg()]. It should not be called alone.

See Also

[gibbs_alg()]

Examples

qn0(alpha0 = 1/100, w = 10, N = 5, M = 50, bs = 1000, as = 2, kstar = 2, lambda = 2, Yn = data[,1])


BayesCPclust documentation built on April 4, 2025, 5:19 a.m.