setDistanceLimits.pca: Compute and set statistical limits for Q and T2 residual...

View source: R/pca.R

setDistanceLimits.pcaR Documentation

Compute and set statistical limits for Q and T2 residual distances.

Description

Computes statisticsl limits for orthogonal and score distances (based on calibration set) and assign the calculated values as model properties.

Usage

## S3 method for class 'pca'
setDistanceLimits(
  obj,
  lim.type = obj$lim.type,
  alpha = obj$alpha,
  gamma = obj$gamma,
  ...
)

Arguments

obj

object with PCA model

lim.type

type of limits ("jm", "chisq", "ddmoments", "ddrobust")

alpha

significance level for detection of extreme objects

gamma

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

...

other arguments

Details

The limits can be accessed as fields of model objects: $Qlim and $T2lim. Each is a matrix with four rows and ncomp columns. First row contains critical limits for extremes, second row - for outliers, third row contains mean value for corresponding distance (or its robust estimate in case of lim.type = "ddrobust") and last row contains the degrees of freedom.

Value

Object models with the two fields updated.


svkucheryavski/mdatools documentation built on Aug. 25, 2023, 12:27 p.m.