Learn R Programming

mdatools (version 0.9.4)

setResLimits.pca: Set statistical limits for Q and T2 residuals for PCA model

Description

Computes statisticsl limits for Q and T2 residuals for a PCA model and assing the calculated values as corresponding model properties

Usage

# S3 method for pca
setResLimits(obj, alpha = obj$alpha, gamma = obj$gamma,
  ...)

Arguments

obj

object with PCA model

alpha

significance level for detection of extreme objects

gamma

significance level for detection of outliers (for data driven approach)

...

other arguments

Value

Returns a list with two matrices: T2lim and Qlim. Each matrix contains limits for extreme objects and outliers (first two rows), mean residual and degrees of freedom, calculated for each number of components included to the model

Details

If data driven method is used, first two rows of Qlim and T2lim will contain slope and intercept of line defined by the method, otherwise they contain the critical values (first row for extreme values and second for outliers) for each of the residuals.

Third row containes average values and fourth row contains degrees of freedom.

See help for pca for more details.