Learn R Programming

mdatools (version 0.9.4)

pca.cal: PCA model calibration

Description

Calibrates (builds) a PCA model for given data and parameters

Usage

pca.cal(x, ncomp, center, scale, method, exclcols = NULL,
  exclrows = NULL, cv, rand, lim.type, alpha, gamma, info)

Arguments

x

matrix with data values

ncomp

number of principal components to calculate

center

logical, do mean centering or not

scale

logical, do standardization or not

method

algorithm for compiting PC space (only 'svd' and 'nipals' are supported so far)

exclcols

columns to be excluded from calculations (numbers, names or vector with logical values)

exclrows

rows to be excluded from calculations (numbers, names or vector with logical values)

cv

number of segments for random cross-validation (1 for full cross-validation).

rand

vector with parameters for randomized PCA methods (if NULL, conventional PCA is used instead)

lim.type

which method to use for calculation of critical limits for residuals (see details for pca)

alpha

significance level for calculating critical limits for T2 and Q residuals.

gamma

significance level for calculating outlier limits for T2 and Q residuals.

info

a short text line with model description.

Value

an object with calibrated PCA model