Learn R Programming

albatross (version 0.1-1)

feemjackknife: Jack-knife outlier detection in PARAFAC models

Description

Perform leave-one-out fitting + validation of PARAFAC models on a given FEEM cube.

Usage

feemjackknife(cube, ...)

Arguments

cube

A feemcube object.

Passed as-is to feemparafac and, eventually, to parafac.

Value

An list of class feemjackknife containing the following entries:

overall

Result of fitting the overall cube with feemparafac.

leaveone

A list of length dim(cube)[3] containing the reduced dataset components. Every feemparafac object in the list has an additional Chat attribute containing the result of fitting the excluded spectrum back to the loadings of the reduced model.

Details

The function takes each sample out of the dataset, fits a PARAFAC model without it, then fits the outstanding sample to the model with emission and excitation factors fixed.

The individual leave-one-out models are reordered according to best Tucker's congruence coefficient match and rescaled so that:

$$\sum_r \left( % \sum_i (S_{1,r} A_{i,r} - A^\mathrm{orig}_{i,r})^2 + % \sum_j (S_{2,r} B_{j,r} - B^\mathrm{orig}_{j,r})^2 % \right) \rightarrow \min_\mathbf{S} $$

subject to \(% S_{3,r} = \frac{1}{S_{1,r} S_{2,r}} \; \forall r\), to make them more comparable.

Once the models are fitted, resample influence plots and identity match plots can be produced from resulting data to detect outliers.

It is recommended to fully name the parameters to be passed to feemparafac to avoid problems.

References

J. Riu, R. Bro, Jack-knife technique for outlier detection and estimation of standard errors in PARAFAC models, Chemometrics and Intelligent Laboratory Systems. 65 (2003) 35-49. 10.1016/S0169-7439(02)00090-4

See Also

plot.feemjackknife, feemparafac

Examples

Run this code
# NOT RUN {
  data(feems)
  cube <- feemscale(
    feemscatter(feemcube(feems, FALSE), rep(24, 4)),
    na.rm = TRUE
  )
  # takes a long time
  jk <- feemjackknife(cube, nfac = 3, const = rep('nonneg', 3))
  plot(jk)
# }

Run the code above in your browser using DataLab