Learn R Programming

normtest (version 1.1)

geary.norm.test: Geary test for normality

Description

Performs Geary test for the composite hypothesis of normality, see Geary (1935).

Usage

geary.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 Geary statistic.
  • p.valuethe p-value for the test.
  • methodthe character string "Geary test for normality".
  • data.namea character string giving the name(s) of the data.

Details

The Geary test for normality is based on the following statistic: $$d = \frac{1}{ns}\sum_{i=1}^n|X_i-\overline{X}|,$$ where $$s^2=\frac{1}{n}\sum_{i=1}^n(X_i-\overline{X})^2.$$ The p-value is computed by Monte Carlo simulation.

References

Geary, R. C. (1935): The ratio of the mean deviation to the standard deviation as a test of normality. --- Biometrika, vol. 27, pp. 310--332.

Examples

Run this code
geary.norm.test(rnorm(100))
geary.norm.test(runif(100,-1,1))

Run the code above in your browser using DataLab