Implementation of the Anderson-Darling goodness of fit test.
Usage
ad.test(x, distr.fun, ...)
Arguments
x
a random sample from a possibly unknown continuous distribution
distr.fun
a named CDF, such as pnorm, punif, etc.
...
extra parameters for the distribution function above, such as location and scale parameters, etc.
Details
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.
Value
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.
Author(s)
Carlos J. Gil Bellosta
References
G. and J. Marsaglia, "Evaluating the Anderson-Darling Distribution", Journal of Statistical Software, 2004
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(ADGofTest)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/ADGofTest/ad.test.Rd_%03d_medium.png", width=480, height=480)
> ### Name: ad.test
> ### Title: Anderson-Darling GoF test
> ### Aliases: ad.test
> ### Keywords: htest
>
> ### ** Examples
>
> set.seed( 123 )
> x <- runif( 100 )
>
> ad.test( x )$p.value
AD
0.9900337
>
> ad.test( x, pnorm, 0, 1 )$p.value
AD
6e-06
>
> replicate( ad.test( rnorm( 100 ), pnorm )$p.value, 100 )
list()
>
>
>
>
>
> dev.off()
null device
1
>