plotTransCompMeans: Plot translated compositional means

View source: R/GcClusterFunctions.R

plotTransCompMeansR Documentation

Plot translated compositional means

Description

Plot translated compositional means for the pdfs in the finite mixture model.

Usage

plotTransCompMeans(simplexModPar, simplexStats, gcData, elementOrder,
  intervalPercentage = 95, symbolSize = 0.75, yLimits = 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.

simplexStats

List containing statistics for the simplex, which will be used for the translation. This list is return by function calcSimplexStats, for which the documentation includes a complete description of this container.

gcData

List containing the geochemical and related data. This container is described in the package documentation.

elementOrder

Vector specifying the order in which the elements are plotted.

intervalPercentage

Credible interval for the distributions of the translated compositional means. Typical values are 50, 90, or 95.

symbolSize

The size of the plotting symbol.

yLimits

Vector of length 2 specifying the limits of the y-axis. If an element is NA then ggplot computes the corresponding axis limit.

isEePlotted

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

Details

The compositional means for each pdf, which are within container simpleModPar, are translated by sample center, which is within container simplexStats. (Alternatively, the user can pick a composition to perform the translation that is most helful to the interpretation.) The translation is the simplex operation that is called "perturbation difference" (Pawlowsky-Glahn, 2015, p. 24-25).

The translated compositional mean is a vector, in which each vector element corresponds to a chemical element (or a amalgamation of chemical elements). The Monte Carlo samples of this vector comprise Monte Carlo samples of each vector element, which must be summarized so that they can be visualized. For each vector element, three quantiles of the samples are computed. (The quantiles always include the 0.50 quantile. The other two quantiles define the credible interval. For example, if argument intervalPercentage is set to its default value, then the other two quantiles are the 0.025 and 0.975 quantiles.) Within the plot symbol, the 0.50 quantile is represented by a dot, and the credible interval is represented by a vertical line.

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: 
plotTransCompMeans(simplexModPar, simplexStats, gcData, elementOrder)

## End(Not run)


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