[R] outlier identify in qqplot

agent dunham crosspide at hotmail.com
Wed Nov 16 15:52:27 CET 2011

Dear Community, 

I want to identify outliers in my data. I don't know how to use identify
command in the plots obtained. 

I've gone through help files and use mahalanobis example for my purpose: 

NormalMultivarianteComparefunc <- function(x) { 
	Sx <- cov(x)
	D2 <- mahalanobis(x, colMeans(x), Sx)
	plot(density(D2, bw=.5), main="Squared Mahalanobis distances, n=nrow(x),
	qqplot(qchisq(ppoints(nrow(x)), df=ncol(x)), D2,
		main = expression("Q-Q plot of Mahalanobis" * ~D^2 *
                         " vs. quantiles of" * ~ chi[ncol(x)]^2))
	abline(0, 1, col = 'gray')

Then I run:  

NormalMultivarianteComparefunc(y); y dataframe with the data. Now, let's say
y =replicate(5, rnorm(100))

##what should I write now to identify data from the plot??
warning: no point within 0.25 inches
/  ????? 

I know I can use aq.plot, but I would be very grateful if you could help me
with identify. 

/By the way, in the function, how can the title write the value of the
variables in spite of "ncol(x)" or "nrow(x)"/

Thanks in advance, user at host.com

View this message in context: http://r.789695.n4.nabble.com/outlier-identify-in-qqplot-tp4076587p4076587.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list