plotSqrtVarMatrices: Plot the combined, scaled variation matrices

View source: R/GcClusterFunctions.R

plotSqrtVarMatricesR Documentation

Plot the combined, scaled variation matrices

Description

Plot the combined, scaled variation matrices. Because a variation matrix is symmetric and its diagonal is zero, the two variation matrices from the two pdfs are combined into a single matrix. The matrix is then scaled by the square root function, to reduce its range.

Usage

plotSqrtVarMatrices(simplexModPar, elementOrder, colorScale = "spectrum",
  scaleRange = NULL, isEePlotted = FALSE)

Arguments

simplexModPar

List containing Monte Carlo samples of four parameters in the finite mixture model. These parameters (namely, the mean vector and covariance matrix for each pdf) are expressed in terms of their equivalent values in the simplex (namely, the compositional mean vector and the variation matrix for each pdf). This list is return by function backTransform, for which the documentation includes a complete description of this container.

elementOrder

Vector specifying the order in which the elements are plotted.

colorScale

Character string specifying the color scale for the plot. The choices are either "spectrum" (default) and "rainbow."

scaleRange

Vector of length 2 specifying the range of the color scale.

isEePlotted

Logical variable specifying whether the amalgamated concentration "EE", which accounts for all omitted and unmeasured element concentrations, is included in the plot.

Details

In the plot, the upper triangle is the upper triangle from the variation matrix for pdf 1, and the lower triangle is the lower triangle from the variation matrix for pdf 2.

The pixels represent scaled variances of the log-ratios between the respective chemical elements. The scaling is desirable because it reduces the large range of the variances, making it easier to visualize all of the variances together. The scaling function is the square root; so, the pixels represent standard deviations of the log-ratios between the respective chemical elements.

References

Pawlowsky-Glahn, V., Egozcue, J.J., and Tolosana-Delgado, R., 2015, Modeling and analysis of compositional data: John Wiley and Sons, Ltd.

Examples

## Not run: 
plotSqrtVarMatrix(simplexModPar, elementOrder, colorScale = "rainbow")

## End(Not run)


USGS-R/GcClust documentation built on April 17, 2023, 8:08 p.m.