dirichletprocess (version 0.2.0)

Initialise: Initialise a Dirichlet process object

Description

Initialise a Dirichlet process object by assigning all the data points to a single cluster with a posterior or prior draw for parameters.

Usage

Initialise(dpObj, posterior = TRUE, m = 3, verbose = TRUE)

Arguments

dpObj

A Dirichlet process object.

posterior

TRUE/FALSE value for whether the cluster parameters should be from the posterior. If false then the values are from the prior.

m

Number of auxiliary variables to use for a non-conjugate mixing distribution. Defaults to m=3. See ClusterComponentUpdate for more details on m.

verbose

Logical flag indicating whether to output the acceptance ratio for non-conjugate mixtures.

Value

A Dirichlet process object that has initial cluster allocations.