head 1.5; access; symbols; locks adrian:1.5; strict; comment @# @; 1.5 date 2018.06.06.08.15.34; author adrian; state Exp; branches; next 1.4; 1.4 date 2018.06.06.08.05.03; author adrian; state Exp; branches; next 1.3; 1.3 date 2018.03.29.13.57.43; author adrian; state Exp; branches; next 1.2; 1.2 date 2014.06.09.08.37.42; author adrian; state Exp; branches; next 1.1; 1.1 date 2014.06.09.04.48.21; author adrian; state Exp; branches; next ; desc @@ 1.5 log @Summary: minor @ text @\name{ad.test} \alias{ad.test} \title{ Anderson-Darling Test of Goodness-of-Fit } \description{ Performs the Anderson-Darling test of goodness-of-fit to a specified continuous univariate probability distribution. } \usage{ ad.test(x, null = "punif", ..., estimated=FALSE, nullname) } \arguments{ \item{x}{ Numeric vector of data values. } \item{null}{ A function, or a character string giving the name of a function, to compute the cumulative distribution function for the null distribution. } \item{\dots}{ Additional arguments for the cumulative distribution function. } \item{estimated}{ Logical value indicating whether the parameters of the distribution were estimated using the data \code{x} (composite null hypothesis), or were fixed in advance (simple null hypothesis, the default). } \item{nullname}{ Optional character string describing the null distribution. The default is \code{"uniform distribution"}. } } \details{ This command performs the Anderson-Darling test of goodness-of-fit to the distribution specified by the argument \code{null}. It is assumed that the values in \code{x} are independent and identically distributed random values, with some cumulative distribution function \eqn{F}. The null hypothesis is that \eqn{F} is the function specified by the argument \code{null}, while the alternative hypothesis is that \eqn{F} is some other function. By default, the test assumes that all the parameters of the null distribution are known in advance (a \emph{simple} null hypothesis). This test does not account for the effect of estimating the parameters. If the parameters of the distribution were estimated (that is, if they were calculated from the same data \code{x}), then this should be indicated by setting the argument \code{estimated=TRUE}. The test will then use the adjustment method of Braun (1980) to allow for parameter estimation. Braun's method involves randomly dividing the data into two equally-sized subsets, so the \eqn{p}-value is not the same if the test is repeated. } \value{ An object of class \code{"htest"} representing the result of the hypothesis test. } \references{ Anderson, T.W. and Darling, D.A. (1952) Asymptotic theory of certain 'goodness-of-fit' criteria based on stochastic processes. \emph{Annals of Mathematical Statistics} \bold{23}, 193--212. Anderson, T.W. and Darling, D.A. (1954) A test of goodness of fit. \emph{Journal of the American Statistical Association} \bold{49}, 765--769. Braun, H. (1980) A simple method for testing goodness-of-fit in the presence of nuisance parameters. \emph{Journal of the Royal Statistical Society} \bold{42}, 53--63. Marsaglia, G. and Marsaglia, J. (2004) Evaluating the Anderson-Darling Distribution. \emph{Journal of Statistical Software} \bold{9} (2), 1--5. February 2004. \url{http://www.jstatsoft.org/v09/i02} } \author{ Original C code by George Marsaglia and John Marsaglia. \R interface by Adrian Baddeley. } \seealso{ \code{\link{pAD}} for the null distribution of the test statistic. } \examples{ x <- rnorm(10, mean=2, sd=1) ad.test(x, "pnorm", mean=2, sd=1) ad.test(x, "pnorm", mean=mean(x), sd=sd(x), estimated=TRUE) } \keyword{htest} @ 1.4 log @Summary: new argument @ text @d54 3 a56 1 to allow for parameter estimation. @ 1.3 log @Summary: added message about simple null @ text @d12 1 a12 1 ad.test(x, null = "punif", ..., nullname) d26 5 d46 9 a54 3 This version of the test assumes that all the parameters of the null distribution are known (a \emph{simple} null hypothesis). It does not account for the effect of estimating the parameters. d70 5 d91 1 @ 1.2 log @minor @ text @d40 4 @ 1.1 log @Initial revision @ text @d47 1 a47 1 Asymptotic theory of certain `goodness-of-fit’ criteria based d53 1 a53 1 \emph{Journal of the American Statistical Association} \bold{49}, 765-–769. d62 1 a62 1 C code by G. and J. Marsaglia. d69 2 a70 2 x <- runif(10) ad.test(x) a72 1 @