mcrals.cal: MCR-ALS calibration

View source: R/mcrals.R

mcrals.calR Documentation

MCR-ALS calibration

Description

The method resolves spectral data into pure component spectra and contributions using the Alternating Least Squares algorithm with constraints.

Usage

mcrals.cal(
  D,
  ncomp,
  cont.constraints,
  spec.constraints,
  spec.ini,
  cont.forced,
  spec.forced,
  cont.solver,
  spec.solver,
  max.niter,
  tol,
  verbose
)

Arguments

D

matrix with the spectra

ncomp

number of pure components

cont.constraints

a list with constraints to be applied to contributions (see details).

spec.constraints

a list with constraints to be applied to spectra (see details).

spec.ini

a matrix with initial estimation of the pure components spectra.

cont.forced

a matrix that allows forcing some of the concentration values (see details).

spec.forced

a matrix that allows forcing some of the spectra values (see details).

cont.solver

which function to use as a solver for resolving of pure components contributions (see details).

spec.solver

which function to use as a solver for resolving of pure components spectra (see details).

max.niter

maximum number of iterations.

tol

tolerance, when explained variance change is smaller than this value, iterations stop.

verbose

logical, if TRUE information about every iteration will be shown.

Value

The function returns a list with the following fields:

ncomp

number of pure components.

resspec

matrix with resolved spectra.

rescont

matrix with resolved contributions.

cont.constraints

list with contribution constraints provided by user.

spec.constraints

list with spectra constraints provided by user.

max.niter

maximum number of iterations


mdatools documentation built on March 6, 2026, 5:08 p.m.