pcamb_classic {SCOUTer} | R Documentation |
pcamb_classic
Description
Principal Component Analysis (PCA) model fitting according to a matrix X using singular value decomposition (svd)
Usage
pcamb_classic(X, ncomp, alpha, prepro)
Arguments
X |
Matrix with observations that will used to fit the PCA model. |
ncomp |
An integer indicating the number of PCs that the model will have. |
alpha |
A number between 0 and 1 indicating the type I risk assumed to calculate
the Upper Control Limits (UCLs) for the Squared Prediction Error (SPE), the Hotelling's
T^2_A and the scores. The confidence level of these limits will be |
prepro |
A string indicating the preprocessing to be performed on X. Its possible
values are: |
Value
list with elements containing information about PCA model:
-
m
: mean vector. -
s
: standard deviation vector. -
P
: loading matrix with the loadings of each PC stored as columns. -
Pfull
: full loading matrix obtained by the svd, -
lambda
: vector with the variance of each PC. -
limspe
: Upper Control Limit for the SPE with a confidence level (1-alpha)*100 %. -
limt2
: Upper Control Limit for the T^2_A with a confidence level (1-alpha)*100 %. -
limits_t
: Upper control Limits for the scores with a confidence level (1-alpha)*100 %. -
prepro
: string indicating the type of preprocessing performed on X. -
ncomp
: number of PCs of the PCA model, A. -
alpha
: value of the type I risk assumed to calculate the Upper Control Limits of the SPE, T^2_A and scores. -
n
: dimension of the number of rows in X. -
S
: covariance matrix of X.
Examples
X <- as.matrix(X)
pcamodel.ref <- pcamb_classic(X, 3, 0.1, "autosc") # PCA-MB with all observations
pcamodel.ref <- pcamb_classic(X[1:40,], 2, 0.05, "cent") # PCA-MB with first 40
# observations