I am using R dixon.test in order to perform Q test for detection of outliers. The p-values for high Q values are consistent with the table in Rorabacher, D.B. (1991) http://www.flworkshop.com/sscs/dixon_test.pdf, but it seems that small Q-values get problematic p-values. For example:
dixon.test(c(0.324,0.5,1,1.324),two.sided=T) Q = 0.324, p-value = 1 dixon.test(c(0.324,0.5,1,1.324),two.sided=F) Q = 0.324, p-value = 0.5 The p value I expect by simulation is ~0.83: norm=matrix(nrow=1000,ncol=4) for (i in 1:1000){ norm[i,]<-rnorm(4) q[i]<-dixon.test(norm[i,])$statistic p[i]<-dixon.test(norm[i,])$p.value>}<br> hist(q) expected.p.val<- length(which(q>0.324))/1000 In particular I am concerened from the misleading result of dixon.test(c(1,1,2,2),two.sided=T) Q = 0, p-value < 2.2e-16 I would appreciate any help with this issue, -- View this message in context: http://r.789695.n4.nabble.com/problematic-p-values-for-Dixon-Q-test-tp4642983.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.