Learn R Programming

normtest (version 1.1)

skewness.norm.test: Skewness test for normality

Description

Performs skewness test for the composite hypothesis of normality, see, e.g., Shapiro, Wilk and Chen (1968).

Usage

skewness.norm.test(x, nrepl=2000)

Arguments

x
a numeric vector of data values.
nrepl
the number of replications in Monte Carlo simulation.

Value

  • A list with class "htest" containing the following components:
  • statisticthe value of the sample skewness.
  • p.valuethe p-value for the test.
  • methodthe character string "Skewness test for normality".
  • data.namea character string giving the name(s) of the data.

Details

The skewness test for normality is based on the sample skewness: $$\sqrt{b_1} = \frac{\frac{1}{n}\sum_{i=1}^n(X_i - \overline{X})^3}{\left(\frac{1}{n}\sum_{i=1}^n(X_i - \overline{X})^2\right)^{3/2}},$$ The p-value is computed by Monte Carlo simulation.

References

Shapiro, S. S., Wilk, M. B. and Chen, H. J. (1968): A comparative study of various tests for normality. --- Journal of the American Statistical Association, vol. 63, pp. 1343--1372.

Examples

Run this code
skewness.norm.test(rnorm(100))
skewness.norm.test(abs(runif(100,-2,5)))

Run the code above in your browser using DataLab