Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

adtest

Anderson-Darling Normality Tests


Description

This function provides three kinds of Anderson-Darling Normality Tests (Anderson and Darling, 1952).

Usage

adtest(x, R = 1000, locscatt = "standard")

Arguments

x

either a numeric vector, or a data.frame, or a matrix

R

Number of Monte Carlo simulations to obtain p-values

locscatt

standard for classical estimates of mean and (co)variance. robust for robust estimates using ‘covMcd()’ from package robustbase

Details

Three version of the test are implemented (univariate, angle and radius test) and it depends on the data which test is chosen.

If the data is univariate the univariate Anderson-Darling test for normality is applied.

If the data is bivariate the angle Anderson-Darling test for normality is performed out.

If the data is multivariate the radius Anderson-Darling test for normality is used.

If ‘locscatt’ is equal to “robust” then within the procedure, robust estimates of mean and covariance are provided using ‘covMcd()’ from package robustbase.

To provide estimates for the corresponding p-values, i.e. to compute the probability of obtaining a result at least as extreme as the one that was actually observed under the null hypothesis, we use Monte Carlo techniques where we check how often the statistic of the underlying data is more extreme than statistics obtained from simulated normal distributed data with the same (column-wise-) mean(s) and (co)variance.

Value

statistic

The result of the corresponding test statistic

method

The chosen method (univariate, angle or radius)

p.value

p-value

Note

These functions are use by adtestWrapper.

Author(s)

Karel Hron, Matthias Templ

References

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

See Also

Examples

adtest(rnorm(100))
data(machineOperators)
x <- machineOperators
adtest(pivotCoord(x[,1:2]))
adtest(pivotCoord(x[,1:3]))
adtest(pivotCoord(x))
adtest(pivotCoord(x[,1:2]), locscatt="robust")

robCompositions

Compositional Data Analysis

v2.3.0
GPL (>= 2)
Authors
Matthias Templ [aut, cre] (<https://orcid.org/0000-0002-8638-5276>), Karel Hron [aut] (<https://orcid.org/0000-0002-1847-6598>), Peter Filzmoser [aut] (<https://orcid.org/0000-0002-8014-4682>), Kamila Facevicova [ctb], Petra Kynclova [ctb], Jan Walach [ctb], Veronika Pintar [ctb], Jiajia Chen [ctb], Dominika Miksova [ctb], Bernhard Meindl [ctb], Alessandra Menafoglio [ctb] (<https://orcid.org/0000-0003-0682-6412>), Alessia Di Blasi [ctb], Federico Pavone [ctb], Gianluca Zeni [ctb]
Initial release
2020-11-18

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.