| Title: | Anderson-Darling GoF test |
|---|---|
| Description: | Anderson-Darling GoF test with p-value calculation based on Marsaglia's 2004 paper "Evaluating the Anderson-Darling Distribution" |
| Authors: | Carlos J. Gil Bellosta |
| Maintainer: | Carlos J. Gil Bellosta <[email protected]> |
| License: | GPL |
| Version: | 0.3 |
| Built: | 2026-05-29 10:40:51 UTC |
| Source: | https://github.com/cran/ADGofTest |
Implementation of the Anderson-Darling goodness of fit test.
| Package: | ADGofTest |
| Type: | Package |
| Version: | 0.1 |
| Date: | 2009-06-26 |
| License: | GPL |
| LazyLoad: | yes |
Carlos J. Gil Bellosta
Maintainer: Carlos J. Gil Bellosta <[email protected]>
G. and J. Marsaglia, "Evaluating the Anderson-Darling Distribution", Journal of Statistical Software, 2004
Implementation of the Anderson-Darling goodness of fit test.
ad.test(x, distr.fun, ...)ad.test(x, distr.fun, ...)
x |
a random sample from a possibly unknown continuous distribution |
distr.fun |
a named CDF, such as |
... |
extra parameters for the distribution function above, such as location and scale parameters, etc. |
If the distr.fun is provided, the function checks whether x is a iid sample from the distribution described by such CDF.
Otherwise, whether they follow a uniform law.
The output is an object of the class htest exactly like for the Kolmogorov-Smirnov test, ks.test.
The statistic and p.value fields are the most relevant ones.
Carlos J. Gil Bellosta
G. and J. Marsaglia, "Evaluating the Anderson-Darling Distribution", Journal of Statistical Software, 2004
set.seed( 123 ) x <- runif( 100 ) ad.test( x )$p.value ad.test( x, pnorm, 0, 1 )$p.value replicate( ad.test( rnorm( 100 ), pnorm )$p.value, 100 )set.seed( 123 ) x <- runif( 100 ) ad.test( x )$p.value ad.test( x, pnorm, 0, 1 )$p.value replicate( ad.test( rnorm( 100 ), pnorm )$p.value, 100 )