Have you considered Monte Carlo?

Invent a test, then Monte Carlo it to get a p-value.

Something similar to what you are asking is provided by Monte Carlo confidence bounds on a QQ plot, discussed on this list last June. To find it, go to www.r-project.org -> Search -> "R site search" -> "confidence bounds on QQ plot". I got 9 hits from this just now. The first was an answer to a question I asked then on this issue, giving two references.

hope this helps. spencer graves

Yong Chao wrote:

I tried to use shapiro.test or ks.test to check the
normality of some data, the problem is, the
distribution function is a mixture of a Gaussian and
some other distributions at the tails. The hypothesis
is that if the tails are excluded, the distribution is
perfect Gaussian, and I want to test that.

But I cannot simply cut the tails off and do a
normality test on the truncated data, as shown in the
following example, this will fail.


So that question is: how can I test whether the middle chunk of the distribution is Gaussian?

Thanks!

Yong



r<-rnorm(1000)
r.trunc<-r[which(abs(r)<1.5)]
shapiro.test(r.trunc)



Shapiro-Wilk normality test

data: r.trunc W = 0.9855, p-value = 1.237e-07



ks.test(r.trunc, "pnorm")



One-sample Kolmogorov-Smirnov test

data: r.trunc D = 0.0873, p-value = 3.116e-06
alternative hypothesis: two.sided





______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html



______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to