Tell me more ×
Cross Validated is a question and answer site for statisticians, data analysts, data miners and data visualization experts. It's 100% free, no registration required.

I know ad.test() can be used for testing normality.

Is it possible to get ad.test compare the distribution of two data?

x=readcsv("mydata.csv", header=T)
y=rgev(2000)
ad.test(x,y)

How can I do Anderson Darling statistic for goodness of fit of two data?

share|improve this question
1  
The Wikipedia article on the A-D test mentions this under the heading "Non-parametric k-sample tests." Its reference, a 1987 JASA paper by Sholz and Stephens, is freely available at cithep.caltech.edu/~fcp/statistics/hypothesisTest/… . – whuber Jun 23 '11 at 16:05
If the question is: how can I do it in R (as the tag suggests): good question (+1) (and the answer is probably: rig it yourself), albeit somewhat misplaced here (StackOverflow is a better place for this kind of question). – Nick Sabbe Jun 23 '11 at 19:00
@Nick Finding or implementing a GoF test, whether in R or any other language, fits squarely within our interest in all things statistical. – whuber Jun 23 '11 at 19:13
@whuber: I stand corrected: I just read the relevant part of the faq. Still, it's a thin line between love and hate. But I didn't vote to migrate :-) – Nick Sabbe Jun 23 '11 at 19:27
2  
@Nick I agree about the thin line. When a question focuses purely on the mechanics of programming, its appropriateness here becomes doubtful. You can find periodic discussions about this on meta. – whuber Jun 23 '11 at 20:19

1 Answer

The adk package for R does this. http://cran.r-project.org/web/packages/adk/

install.packages("adk")
library(adk)
adk.test(runif(50), rnorm(30))
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.