LikelihoodFunction: The Likelihood function of a Dirichlet process object.

Description Usage Arguments Value Examples

View source: R/likelihood_function.R

Description

Collecting the fitted cluster parameters and number of datapoints associated with each parameter a likelihood can be calculated. Each cluster is weighted by the number of datapoints assigned.

Usage

1
LikelihoodFunction(dpobj, ind)

Arguments

dpobj

Dirichlet process object.

ind

The iteration number. Defaults to the last iteration.

Value

A function f(x) that represents the Likelihood of the dpobj.

Examples

1
2
3
4
5
y <- rnorm(10)
dp <- DirichletProcessGaussian(y)
dp <- Fit(dp, 5)
f <- LikelihoodFunction(dp)
plot(f(-2:2))

dirichletprocess documentation built on July 2, 2020, 2 a.m.