Computes ridgeline ratios and unimodality checks for pairs of components given the parameters of a Gaussian mixture. Produces ridgeline plots.
ridgeline.diagnosis (propvector,muarray,Sigmaarray,
                                k=length(propvector),
                                ipairs="all", compute.ratio=TRUE,by=0.001,
                                ratiocutoff=NULL,ridgelineplot="matrix")vector of component proportions. Length must be number of components, and must sum up to 1.
matrix of component means (different components are in different columns).
three dimensional array with component covariance matrices (the third dimension refers to components).
integer. Number of components.
"all" or list of vectors of two integers. If
    ipairs="all", computations are carried out for all pairs of
    components. Otherwise, ipairs gives the pairs of components for
    which computations are carried out.
logical. If TRUE, a matrix of ridgeline
    ratios is computed, see Hennig (2010a).
real between 0 and 1. Interval width for density computation along the ridgeline.
real between 0 and 1. If not NULL, the
    connection.matrix (see below) is computed by checking whether
    ridgeline ratios between components are below ratiocutoff.
one of "none", "matrix",
    "pairwise". If "matrix", a matrix of pairwise
    ridgeline plots (see Hennig 2010b) will be plotted. If
    "pairwise", pairwise ridgeline plots are plotted (you may
    want to set par(ask=TRUE) to see them all). No plotting if
    "none".
A list with components
vector of integers, stating for every mixture
  component the number of the cluster of components that would be merged
  by merging connectivity components of the graph specified by
  connection.matrix.
zero-one matrix, in which a one means that the
  mixture of the corresponding pair of components of the original
  mixture is either unimodel (if ratiocutoff=NULL) or that their
  ridgeline ratio is above ratiocutoff. If ipairs!="all",
  ignored pairs always have 0 in this matrix, same for
  ratio.matrix.
matrix with entries between 0 und 1, giving the ridgeline ratio, which is the density minimum of the mixture of the corresponding pair of components along the ridgeline divided by the minimum of the two maxima closest to the beginning and the end of the ridgeline.
Hennig, C. (2010a) Methods for merging Gaussian mixture components, Advances in Data Analysis and Classification, 4, 3-34.
Hennig, C. (2010b) Ridgeline plot and clusterwise stability as tools for merging Gaussian mixture components. To appear in Classification as a Tool for Research, Proceedings of IFCS 2009.
Ray, S. and Lindsay, B. G. (2005) The Topography of Multivariate Normal Mixtures, Annals of Statistics, 33, 2042-2065.
# NOT RUN {
  muarray <- cbind(c(0,0),c(0,0.1),c(10,10))
  sigmaarray <- array(c(diag(2),diag(2),diag(2)),dim=c(2,2,3))
  rd <-
  ridgeline.diagnosis(c(0.5,0.3,0.2),muarray,sigmaarray,ridgelineplot="matrix",by=0.1)
  # Much slower but more precise with default by=0.001.
# }
Run the code above in your browser using DataLab