ad.test: Anderson-Darling Test of Goodness-of-Fit

Description Usage Arguments Details Value Author(s) References Examples

View source: R/andarl.R

Description

Performs the Anderson-Darling test of goodness-of-fit to a specified continuous univariate proba bility distribution

Usage

1
ad.test(x, null = "punif", ..., nullname)

Arguments

x

Numeric vector of data values.

null

A function, or a character string giving the name of a function, to compute the cumulative distribution function for the null distribution

...

Additional arguments for the cumulative distribution function.

nullname

Optional character string describing the null distribution. The default is "uniform distribution".

Details

This command performs the Anderson-Darling test of goodness-of-fit to the distribution specified by the argument null. It is assumed that the values in x are independent and identically distributed random values, with some cumulative distribution function F. The null hypothesis is that F is the function specified by the argument null, while the alternative hypothesis is that F is some other function.

Value

An object of class "htest" representing the result of the hypothesis test

Author(s)

Original C code by George Marsaglia and John Marsaglia. R interface by Adrian Baddeley

References

Anderson, T.W. and Darling, D.A. (1952) Asymptotic theory of certain <e2><80><99>goodness-of-fit<e2><80><99> criteria based on stochastic processes. Annals of Mathematical Statistics 23, 193<e2><80><93>212.

Anderson, T.W. and Darling, D.A. (1954) A test of goodness of fit. Journal of the American Statistical Association 49, 765<e2><80><93>769.

Marsaglia, G. and Marsaglia, J. (2004) Evaluating the Anderson-Darling Distribution. Journal of Statistical Software 9 (2), 1<e2><80><93>5. February 2004. http://www.jstatsoft.org/v09/i02

Examples

1
2
x <- rnorm(10, mean=2, sd=1)
ad.test(x, "pnorm", mean=2, sd=1)

dangulod/ECTools documentation built on May 4, 2019, 3:19 p.m.