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.
# S3 method for dirichletprocess
plot(x, likelihood = FALSE, single = TRUE,
y = NULL, ...)
Dirichlet Process Object to plot
Logical, indicating whether to plot the likelihood from the dpobj.
Logical, indicating whether to draw the posterior from the last iteration or use the full cluster sequence.
Consistency for generic.
Graphical arguments
A ggplot object