postalpha0: Posterior for alpha0

View source: R/postalpha0.R

postalpha0R Documentation

Posterior for alpha0

Description

Posterior for alpha0

Usage

postalpha0(alpha0, a, b, N, cluster)

Arguments

alpha0

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

a

The hyperparameter value for the shape parameter in the gamma prior for alpha0

b

The hyperparameter value for the scale parameter in the gamma prior for alpha0

N

A scalar representing the number of data sequences

cluster

A vector containing the cluster assignments for the data sequences (or its initial values)

Value

A numerical value corresponding to a sample from the posterior of alpha0

Note

This function is called within the Gibbs sampler, but it can be called seperately.

Examples

postalpha0(alpha0 = 1/100, a = 2, b = 1000, N = 5, cluster = c(1,1,2,1,1))


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