Plot of a Dirichlet process mixture of gaussian distribution partition
Source:R/plot_DPM.R
plot_DPM.RdPlot of a Dirichlet process mixture of gaussian distribution partition
Arguments
- z
data matrix
d x nwithddimensions in rows andnobservations in columns.- U_mu
either a list or a matrix containing the current estimates of mean vectors of length
dfor each cluster. Default isNULLin which caseU_SShas to be provided.- U_Sigma
either a list or an array containing the
d x dcurrent estimates for covariance matrix of each cluster. Default isNULLin which caseU_SShas to be provided.- m
vector of length
ncontaining the number of observations currently assigned to each clusters.- c
allocation vector of length
nindicating which observation belongs to which clusters.- i
current MCMC iteration number.
- alpha
current value of the DP concentration parameter.
- U_SS
a list containing
"mu"and"S". Default isNULLin which caseU_muandU_Sigmahave to be provided.- dims2plot
index vector, subset of
1:dindicating which dimensions should be drawn. Default is all of them.- ellipses
a logical flag indicating whether ellipses should be drawn around clusters. Default is
TRUEif only 2 dimensions are plotted,FALSEotherwise.- gg.add
a list of instructions to add to the
ggplot2instruction (seegg-add). Default islist(theme()), which adds nothing to the plot.