Learn R Programming

EMMAgeo (version 0.9.1)

robust.EM: Function to extract robust end-members.

Description

This function takes a matrix with end-member loadings and extracts those whose modes fall into specified limits. The function returns a list with all passing end-member loadings and scores, along with their respective coumn-wise (variable-wise) measures of centrality and dispersion.

Usage

robust.EM(Vqsn, limits, quantiles, Vqn, classunits, ID, plot = FALSE, 
    legend, ..., pm = FALSE)

Arguments

Vqsn
Numeric matrix with m samples (rows) and n variables (columns).
limits
Numeric matrix with two columns that contain the boundaries of mode classes for each end-member. The first column contains the lower, the second column the upper limit. If classunits are provided, the limits are assumed to relate to these
quantiles
Optional numeric vector of length two with the quantiles to be evaluated for the robust end-member loadings; default is c(0.25, 0.75).
Vqn
Numeric matrix with optional normalised factor loadings. If present, the same factor loadings as the respectively selected end-member loadings are returned.
classunits
Numeric vector, optional class units (e.g. phi classes or micrometers) of the same length as columns of X.
ID
Numeric or character vector, optional sample IDs of the same length as columns of X.
plot
Logical scalar, optional graphical output of the results, default is FALSE. If set to TRUE, selected end-member loadings are plotted in different colours, according to the specified classes. All end-member loadings are plotted in pale colour, means a
legend
Character scalar, specifing legend position (cf. legend). If omitted, no legend will be plotted, default is no legend.
...
Additional arguments passed to the plot function. Use colour instead of col to create different colours.
pm
Logical scalar to enable pm.

Value

  • A list object containing:
  • Vqsn.dataA list with Vqsn values.
  • Vqsn.meanA matrix with Vqsn means.
  • Vqsn.medianA matrix with Vqsn medians.
  • Vqsn.sdA matrix with Vqsn standard deviations.
  • Vqsn.qt1A matrix with Vqsn quantiles 1.
  • Vqsn.qt2A matrix with Vqsn quantiles 2.
  • Vqn.dataA list with Vqn values.
  • Vqn.meanA matrix with Vqn means.
  • Vqn.medianA matrix with Vqn medians.
  • Vqn.sdA matrix with Vqn standard deviations.
  • Vqn.qt1A matrix with Vqn quantiles 1.
  • Vqn.qt2A matrix with Vqn quantiles 2.

References

Dietze E, Hartmann K, Diekmann B, IJmker J, Lehmkuhl F, Opitz S, Stauch G, Wuennemann B, Borchers A. 2012. An end-member algorithm for deciphering modern detrital processes from lake sediments of Lake Donggi Cona, NE Tibetan Plateau, China. Sedimentary Geology 243-244: 169-180.

See Also

EMMA, test.robustness, define.limits

Examples

Run this code
## load example data set
data(X.artificial, envir = environment())

## truncate the data set for faster computation
X.trunc <- X.artificial[1:20,]

## define limits data set
limits = cbind(c(11, 31, 60, 78), 
               c(13, 33, 62, 80))

## end-member numbers to test
q  <- 4:8
## weight transformation limits to test
lw <- seq(from = 0, to = 0.1, by = 0.025)

## perform robustness test without rejection criteria and plots
TR  <- test.robustness(X.trunc, q, lw)
## extract end-member loadings from robustness test data set
Vqsn <- TR$Vqsn

## extract robust end-members with limits matrix
REM <- robust.EM(Vqsn = Vqsn, limits = limits,
                 plot = TRUE,
                 legend = "topleft", 
                 cex = 0.7, 
                 colour = c("orange", "navyblue", "springgreen4", "red4"),
                 median = TRUE)

Run the code above in your browser using DataLab