| ad.test | R Documentation |
Perform the Anderson-Darling normality test.
ad.test(x)
x |
( |
The Anderson-Darling test is an EDF omnibus test for the composite hypothesis of normality. The test statistic is
A^2 = -n -\frac{1}{n} \sum_{i=1}^{n} (2i - 1) [\ln(z_{i}) + \ln(1 - z_{n + 1 - i})]
where z_{i} = \Phi(\frac{x_{i} - \bar{x}}{s}). Here,
\Phi is the cumulative distribution function of the standard normal
distribution, and \bar{x} and s are mean and standard deviation of
the data values. The p-value is computed from the modified statistic
A^2_*=A^2 (1.0 + 0.75/n + 2.25/n^{2}) according to Table 4.9 in
Stephens (1986).
A list inheriting from classes "htest" containing the following components:
statistic: the value of the statistic.
p.value: the p-value of the test.
method: the character string "Anderson-Darling normality test".
data.name: a character string giving the name(s) of the data.
Adapted from nortest::ad.test()
Stephens, A. M (1986). “Goodness-of-Fit-Techniques.” In D'Agostino, B. R (eds.), chapter Tests based on EDF statistics. CRC Press.
Thode, C. H (2002). Testing for normality, 1 edition. CRC Press. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1201/9780203910894")}.
stats::shapiro.test() for performing the Shapiro-Wilk test for normality.
nortest::cvm.test(), nortest::lillie.test(), nortest::pearson.test(),
nortest::sf.test() for performing further tests for normality.
stats::qqnorm() for producing a normal quantile-quantile plot.
set.seed(123)
ad.test(rnorm(100, mean = 5, sd = 3))
ad.test(runif(100, min = 2, max = 4))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.