backTransform: Back transform to the simplex

View source: R/GcClusterFunctions.R

backTransformR Documentation

Back transform to the simplex

Description

Back transform the mean vectors and covariance matrices of the finite mixture model to the corresponding quantities for the simplex (that is, compositional means and variation matrices).

Usage

backTransform(gcData, nPCs, transData, combinedChains)

Arguments

gcData

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

nPCs

Number of principal components that were used in the finite mixture model.

transData

List containing the transformed geochemical concentrations and related information. This list is return by function transformGcData, for which the documentation includes a complete description of container transData.

combinedChains

A stanfit object containing multiple Monte Carlo chains. This object is return by function combineChains, for which the documentation includes a complete description of container combinedChains.

Value

A list with the following components is returned.

compMean1

Matrix containing Monte Carlo samples of the compositional mean vector for pdf 1. The first dimension of the matrix pertains to indices of the samples; the second dimension pertains to indices of the compositional mean vector.

compMean2

Matrix containing Monte Carlo samples of the mean vector for pdf 2. Its structure is identical to that for compMean1.

varMatrix1

Array containing Monte Carlo samples of the variation matrix for pdf 1. The first dimension of the array pertains to indices of the samples; the second and the third dimensions pertain to indices of the variation matrix.

varMatrix2

Array containing samples of the variation matrix for pdf 2. Its structure is identical to that for varMatrix1.

References

Hron, K., Filzmoser, P., 2015, Exploring compositional data with the robust compositional biplot, in Carpita, M., Brentari, E., Qannari, M., eds., Advances in latent variables - Methods, models and applications, Springer, p 219-226.

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: 
simplexModPar <- backTransform( gcData, nPCs, transData, combinedChains)

## End(Not run)


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