Learn R Programming

mdatools (version 0.7.0)

ldecomp.getDistances: Residuals distances for linear decomposition

Description

Computes residual distances (Q and T2) and modelling power for a data decomposition X = TP' + E.

Usage

ldecomp.getDistances(scores, loadings, residuals, tnorm = NULL, cal = TRUE)

Arguments

scores
matrix with scores (T).
loadings
matrix with loadings (P).
residuals
matrix with residuals (E).
tnorm
vector with singular values for scores normalisation (if NULL will be calculated from scores).
cal
logical, are these results for calibration set or not

Value

Returns a list with Q, Qvar, T2 and modelling power values for each component.

Details

The distances are calculated for every 1:n components, where n goes from 1 to ncomp (number of columns in scores and loadings).