ldecomp.getDistances: Compute score and residual distances

View source: R/ldecomp.R

ldecomp.getDistancesR Documentation

Compute score and residual distances

Description

Compute orthogonal Euclidean distance from object to PC space (Q, q) and Mahalanobis squared distance between projection of the object to the space and its origin (T2, h).

Usage

ldecomp.getDistances(scores, loadings, residuals, eigenvals)

Arguments

scores

matrix with scores (T).

loadings

matrix with loadings (P).

residuals

matrix with residuals (E).

eigenvals

vector with eigenvalues for the components

Details

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

Value

Returns a list with Q, T2 and tnorm values for each component.


mdatools documentation built on Sept. 11, 2024, 7:59 p.m.