dirichletprocess (version 0.2.1)

plot.dirichletprocess: Plot the Dirichlet process object

Description

For a univariate Dirichlet process plot the density of the data with the posterior distribution and credible intervals overlayed. For multivariate data the first two columns of the data are plotted with the data points coloured by their cluster labels.

Usage

# S3 method for dirichletprocess
plot(x, likelihood = FALSE, single = TRUE,
  y = NULL, ...)

Arguments

x

Dirichlet Process Object to plot

likelihood

Logical, indicating whether to plot the likelihood from the dpobj.

single

Logical, indicating whether to draw the posterior from the last iteration or use the full cluster sequence.

y

Consistency for generic.

...

Graphical arguments

Value

A ggplot object