Learn R Programming

mdatools (version 0.9.1)

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 = FALSE)

Arguments

scores

matrix with scores (T).

loadings

matrix with loadings (P).

residuals

matrix with residuals (E).

tnorm

vector with singular values for scores normalisation

cal

if TRUE method will realize that these distances are calculated for calibration set

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).