plot.FastHCS: Robust diagnostic plots for FastHCS

Description Usage Arguments Details Author(s) References See Also Examples

View source: R/FastHCS.R

Description

Creates a diagnostic plot of the robust SD and OD values from a FastHCS model fit, and their parametric cutoffs.

Usage

1
2
## S3 method for class 'FastHCS'
plot(x,col="black",pch=16,...)

Arguments

x

For the plot() method, a FastHCS object, typically resulting as output from FastHCS.

col

A specification for the default plotting color. Vectors of values are recycled.

pch

Either an integer specifying a symbol, or a single character to be used as the default in plotting points. Note that only integers and single-character strings can be set as graphics parameters. Vectors of values are recycled.

...

Further arguments passed to the plot function.

Details

This function produces the PCA diagnostic plot of Hubert et al. (2005). Score distances are the n-vector of distances of each observation to the robust estimate of location on the robust PCA subspace. Likewise, orthogonal distances are the n-vector of distances of each observations to the robust PCA subspace. The observations whose score distance is larger than cutoff.sd or whose orthogonal distance is larger than cutoff.od are considered outliers and receive a flag equal to zero. The orthogonal distances are displayed along the vertical axis and the score distances along the horizontal axis, with the dotted lines indicating their respective cut-offs.

Author(s)

Kaveh Vakili

References

M. Hubert, P. J. Rousseeuw, K. Vanden Branden (2005), ROBPCA: a new approach to robust principal components analysis, Technometrics, 47, 64–79.

See Also

FastHCS

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data(Tablets)
alpha<-0.5
Q<-15
p<-ncol(Tablets[,-1])
ns<-FHCSnumStarts(q=Q,eps=(1-alpha)*4/5)
RunExample<-FALSE
if(RunExample){
	Fit<-FastHCS(x=Tablets[,-1],q=Q,nSamp=ns,seed=1,alpha=0.5)
	colvec<-rep("orange",nrow(Tablets))
	colvec[Tablets[,1]==1]<-"blue"
	plot(Fit,col=colvec,pch=16)
}

Example output

Loading required package: matrixStats
Loading required package: robustbase

Attaching package: 'robustbase'

The following objects are masked from 'package:matrixStats':

    colMedians, rowMedians

FastHCS documentation built on July 8, 2020, 7:14 p.m.