moments (version 0.14)

agostino.test: D'Agostino test of skewness

Description

Performs D'Agostino test for skewness in normally distributed data.

Usage

agostino.test(x, alternative = c("two.sided", "less", "greater"))

Arguments

x
a numeric vector of data values.
alternative
a character string specifying the alternative hypothesis, must be one of '"two.sided"' (default), '"greater"' or '"less"'. You can specify just the initial letter.

Value

A list with class htest containing the following components:
statistic
the list containing skewness estimator and its transformation.
p.value
the p-value for the test.
alternative
a character string describing the alternative hypothesis.
method
a character string indicating what type of test was performed.
data.name
name of the data argument.

Details

Under the hypothesis of normality, data should be symmetrical (i.e. skewness should be equal to zero). This test has such null hypothesis and is useful to detect a significant skewness in normally distributed data.

References

D'Agostino, R.B. (1970). Transformation to Normality of the Null Distribution of G1. Biometrika, 57, 3, 679-681.

See Also

skewness

Examples

set.seed(1234)
x = rnorm(1000)
skewness(x)
agostino.test(x)