gx.eb: Computation of Empirical Balances

Description Usage Arguments Value Note Author(s) References See Also Examples

View source: R/gx.eb.R

Description

Computes empirical balances (ratios) for the stated columns of a n by p matrix of compositional data.

Usage

1
gx.eb(r, s, xx, ...)

Arguments

r

number of parts in the numerator.

s

number of parts in the denominator.

xx

matrix for which the balances for the stated columns will be computed.

...

the column indices of the parts in the numerator, followed by the column indices for the parts in the denominator. The total number of indices must equal the sum of r and s.

Value

z

the vector of n balances.

Note

Multi-element ratios have a long history in exploration geochemistry, the parts in numerator and denominator being selected on the basis of prior knowledge of the mineralogy and geochemistry of the feature, commonly a mineral occurrence, being sought. As the features are rare events ratios can be used to accentuate their numerical expression to increase their ‘contrast’ from the main mass of background data. The use of balances, ratios of geometric means of the parts in the numerator and denominator, accomodates the compositional nature of geochemical data.

Author(s)

Robert G. Garrett

References

Egozcue, J.J. & Pawlowsky-Glahn, V., 2005. Groups of Parts and Their Balances in Compositional Data Analysis. Mathematical Geology, 37(7):795-828.

See Also

ltdl.fix.df

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Make test data available
data(sind.mat2open)

## Compute and display empirical balances for columns 1, 5 & 4 
## of the data vs. columns 2 & 3
temp <- gx.eb(3, 2, sind.mat2open, 1, 5, 4, 2, 3)
shape(temp, "Zn.Cu.Cd/Fe.Mn balance")

## Clean-up
rm(sind.mat2open)
rm(temp)

Example output

Loading required package: MASS
Loading required package: fastICA
  ** Are the data/parts all in the same measurement units? **
  Parts in numerator: Zn Cu Cd 	[ 1 5 4 ]
  Parts in denomintor: Fe Mn 	[ 2 3 ]
Warning messages:
1: In par(old.par) : graphical parameter "cin" cannot be set
2: In par(old.par) : graphical parameter "cra" cannot be set
3: In par(old.par) : graphical parameter "csi" cannot be set
4: In par(old.par) : graphical parameter "cxy" cannot be set
5: In par(old.par) : graphical parameter "din" cannot be set
6: In par(old.par) : graphical parameter "page" cannot be set

rgr documentation built on May 2, 2019, 6:09 a.m.

Related to gx.eb in rgr...