A multivariate data set (m samples composed of n variables) is decomposed by eigenspace analysis and modelled with a given number of end-members (q). Several steps of scaling, transformation, normalisation, eigen space decomposition, factor rotation, data modelling and evaluation are performed.
EMMA(X, q, l, c, Vqn, EM.ID, classunits, ID, rotation = "Varimax",
plot = FALSE, ..., pm = FALSE)
Numeric matrix with m samples (rows) and n variables (columns).
Numeric scalar with number of end-members to be modelled.
Numeric scalar with the weight tranformation limit, i.e. quantiles, cf. Klovan & Imbrie (1971); default is 0.
Numeric scalar specifying the constant sum scaling parameter, e.g. 1, 100, 1000; default is 100.
Numeric matrix specifying optional unscaled user-defined end-member loadings. If provided, these are used instead of model-derived ones.
Character vector with end-member names. If present, these will be set as row-names of the output data set and used in the legend text.
Numeric vector, optional class units (e.g. micrometers or phi-units) of the same length as columns of X.
Numeric or character vector, optional sample IDs of the same length as rows of X.
Character scalar, rotation type, default is "Varimax" (cf.
Dietze et al., 2012). One out of the rotations provided in GPArotation is
possible (cf. rotations
).
Logical scalar, optional graphical output of the results, default is FALSE. If set to TRUE, end-member loadings and end-member scores are plotted.
Logical scalar to enable pm.
Additional arguments passed to the plot function. Since the function returns two plots some additional graphical parameters must be specified as vector with the first element for the first plot and the second element for the second plot.
A list with numeric matrix objects.
Normalised rescaled end-member loadings.
Rescaled end-member scores.
Normalised end-member loadings.
Normalised rescaled end-member loadings.
Rescaled end-member scores.
Modelled data.
Mode class of end-member loadings.
Explained variance of end-members
Absolute row-wise model error.
Absolute column-wise model error.
Row-wise (sample-wise) explained variance.
Column-wise (variable-wise) explained variance.
Number of overlapping end-members.
The function values $loadings
and $scores
are redundant. They
are essentially the same as $Vqsn
and $Mqs
. However, they are
included for user convenience. We kindly thank Christoph Burow for
his quick contribution to remove unnecessary loops.
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. Klovan JE, Imbrie J. 1971. An Algorithm and FORTRAN-IV Program for Large-Scale Q-Mode Factor Analysis and Calculation of Factor Scores. Mathematical Geology 3: 61-77. Miesch AT. 1976. Q-Mode factor analysis of geochemical and petrologic data matrices with constant row sums. U.S. Geological Survey Professsional Papers 574.
# NOT RUN {
## load example data and set phi-vector
data(X, envir = environment())
phi <- seq(from = 1, to = 10, length.out = ncol(X))
## perform EMMA with 5 end-members
EM <- EMMA(X = X, q = 5, l = 0.05, c = 100, plot = TRUE)
## perform EMMA with 4 end-members and more graphical settings
EM <- EMMA(X = X, q = 4, l = 0.05, c = 100,
plot = TRUE,
EM.ID = c("EM 1", "EM 2", "EM 3", "EM 4"),
classunits = phi,
xlab = c(expression(paste("Class [", phi, "]")), "Sample ID"),
cex = 0.7,
col = colors()[c(441, 496, 499, 506)])
# }
Run the code above in your browser using DataLab