https://github.com/cran/robCompositions
Raw File
Tip revision: 823295fe4c382069229ac77435da6e5bb14155b9 authored by Matthias Templ on 11 January 2013, 16:29:55 UTC
version 1.6.2
Tip revision: 823295f
plot.outCoDa.R
plot.outCoDa <- function(x, y, ...){
#	plot(1:length(x$mahalDist), x$mahalDist, ylab="Mahalanobis distance", xlab="Index", type="n", ylim=c(0, max(x$mahalDist)) )
#	points(1:length(x$mahalDist[x$outlierIndex]), x$mahalDist[x$outlierIndex], pch=3, col="red")
#	points(1:length(x$mahalDist[!x$outlierIndex]), x$mahalDist[!x$outlierIndex])	
#	abline(h=x$limit, lty=2)
#	#print(x$mahalDist)
	if(x$method =="standard") yl <- "Mahalanobis distance" else yl <- "Robust Mahalanobis distance" 
	plot(1:length(x$mahalDist), x$mahalDist, ylab = yl,
			xlab = "Index", ylim = c(0, max(x$mahalDist)),
			pch = as.numeric(x$outlierIndex)*2+1)
	abline(h=x$limit, lty=2)
}
back to top