Learn R Programming

EMMAgeo (version 0.9.1)

test.parameters: Function to evaluate influence of model parameters.

Description

All possible combinations of number of end-members and weight transformation limits are used to perform EMMA. The function returns matrices of absolute and relative measures of individual model performance.

Usage

test.parameters(X, q, lw, c, rotation = "Varimax", plot, legend, 
    ..., pm = FALSE)

Arguments

X
Numeric matrix with m samples (rows) and n variables (columns).
q
Numeric vector of length two, specifying the minimum and maximum number of end-members to be modelled.
lw
Numeric vector specifying the weight tranformation limit, i.e. quantile; default is 0.
c
Numeric scalar specifying the constant sum scaling parameter, e.g. 1, 100, 1000; default is 0.
rotation
Character scalar, rotation type, default is "Varimax" (cf. Dietze et al., 2012). One out of the rotations provided in GPArotation is possible (cf. rotations).
plot
Character scalar, optional graphical output of the results. Specify which tested parameter will be plotted: "mEm" (mean absolute row-wise error), "mEn" (mean absolute column-wise error), "mRm" (mean relative row-wise error), "mRn" (mean relative colu
legend
Character scalar, specifying legend position (cf. legend). If omitted, no legend will be plotted, default is no legend.
...
Additional arguments passed to the plot function. Since the function returns two plots (except for plot option "ol"), additional graphical parameters must be specified as vector with the first element for the first plot and the second element for the
pm
Logical scalar to enable pm.

Value

  • A list with result objects
  • mEmAbsolute row-wise model error.
  • mEnAbsolute column-wise model error.
  • mRmMean row-wise explained variance.
  • mRnMean column-wise explained variance.
  • mRtMean total explained variance.
  • olNumber of overlapping end-member loadings.
  • q.maxMaximum number of meaningful end-members.

Details

The mean total explained variance mRt may be used to define a maximum number of meaningful end-members for subsequent modelling, e.g. as the number of end-members, which reaches the first local mRt maximum. Overlapping is defined as one end-member having its mode within the "area" of any other end-member, which is genetically not explainable.

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

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 test parameters
q <- 2:8 # number of end-members
lw <- seq(from = 0, to = 0.3, by = 0.1)

## test parameter influence and plot mean total explained variance
TP <- test.parameters(X = X.trunc, q = q, lw = lw, plot = "mRt",
                      legend = "bottomright", cex = 0.7,
                      colour = rgb((1:7) / 7, 0.9, 0.2, 1))

## show maximum number of end-members
TP$q.max

Run the code above in your browser using DataLab