Creates an object of ldecomp class.
ldecomp(scores = NULL, residuals = NULL, loadings = NULL,
ncomp.selected = NULL, attrs = NULL, tnorm = NULL, dist = NULL,
var = NULL, cal = FALSE, totvar = NULL)
matrix with score values (nobj x ncomp).
matrix with data residuals
matrix with loading values (nvar x ncomp).
number of selected components
list with attributes of original dataset
singular values for score normalization
list with calculated T2 and Q values (e.g. for CV)
list with explained and cumulative explained variance (e.g. for CV)
logical, true if data is for calibration of a LDECOMP based model
full variance of original data, preprocessed and centered
Returns an object (list) of ldecomp
class with following fields:
matrix with score values (nobj x ncomp).
matrix with data residuals (nobj x nvar).
matrix with T2 distances (nobj x ncomp).
matrix with Q statistic (nobj x ncomp).
vector with singular values used for scores normalization.
selected number of components.
explained variance for each component.
cumulative explained variance.
modelling power of variables.
ldecomp
is a general class for decomposition X = TP' + E. Here, X is a data matrix,
T - matrix with scores, P - matrix with loadings and E - matrix with residuals. It is used,
for example, for PCA results (pcares
), in PLS and other methods. The class also
includes methods for calculation and plotting residuals, variances, and so on.
There is no need to use the ldecomp
manually. For example, when build PCA model
with pca
or apply it to a new data, the results will automatically inherit
all methods of ldecomp
.