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 (1-alpha)*100.

prepro

A string indicating the preprocessing to be performed on X. Its possible values are: "none", for any preprocessing, "cent", for a mean-centering, or "autosc", for a mean-centering and unitary variance scaling (autoscaling).

Value

list with elements containing information about PCA model:

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

[Package SCOUTer version 1.0.0 Index]