threshold: Non-parametric Threshold Estimation

View source: R/threshold.R

thresholdR Documentation

Non-parametric Threshold Estimation


Calculate the non-parametric critical value threshold estimates for the SPE and T2 monitoring test statistics.


threshold(pca_object, alpha = 0.001, ...)



A list with class "pca" from the internal pca() function


The upper 1 - alpha quantile of the SPE and T2 densities from the training data passed to this function. Defaults to 0.001.


Lazy dots for additional internal arguments


This function takes in a pca object returned by the pca() function and a threshold level defaulting to alpha = 0.1 percent of the observations. This critical quantile is set this low to reduce false alarms, as described in Kazor et al (2016). The function then returns a calculated SPE threshold corresponding to the 1 - alpha critical value, a similar T2 threshold, and the projection and Lambda Inverse (1 / eigenvalues) matrices passed through from the pca() function call.

This internal function is called by faultFilter().


A list with classes "threshold" and "pca" containing:

SPE_threshold –

the 1 - alpha quantile of the estimated SPE density

T2_threshold –

the 1 - alpha quantile of the estimated Hotelling's T2 density

projectionMatrix –

a projection matrix from the data feature space to the feature subspace which preserves some pre-specified proportion of the energy of the data scatter matrix. This pre-specified energy proportion is user supplied as the var.amnt argument in the pca() function. See the pca() function's help file for more details.

LambdaInv –

a diagonal matrix of the reciprocal eigenvalues of the data scatter matrix

T2 –

the vector of Hotelling's T2 test statistic values for each of the n observations in "data"


the vector of SPE test statistic values for each of the n observations in "data"

See Also

Called by: faultFilter. This function uses a port of the quantile.density() function from the now-orphaned BMS package.


nrml <- mspProcessData(faults = "NOC")
scaledData <- scale(nrml[,-1])
pca_obj <- pca(scaledData)
threshold(pca_object = pca_obj)

mvMonitoring documentation built on Nov. 22, 2023, 1:09 a.m.