Computes residual distances (Q and T2) and modelling power for a data decomposition X = TP' + E.
ldecomp.getDistances(scores, loadings, residuals, tnorm = NULL, cal = FALSE)
matrix with scores (T).
matrix with loadings (P).
matrix with residuals (E).
vector with singular values for scores normalisation
if TRUE method will realize that these distances are calculated for calibration set
Returns a list with Q, Qvar, T2 and modelling power values for each component.
The distances are calculated for every 1:n components, where n goes from 1 to ncomp (number of columns in scores and loadings).