shapiro.exp.test: Shapiro-Wilk test for exponentiality

Description Usage Arguments Details Value Author(s) References Examples

View source: R/shapiro.exp.test.R

Description

Performs Shapiro-Wilk test for the composite hypothesis of exponentiality, see e.g. Shapiro and Wilk (1972).

Usage

1
shapiro.exp.test(x, nrepl=2000)

Arguments

x

a numeric vector of data values.

nrepl

the number of replications in Monte Carlo simulation.

Details

The Shapiro-Wilk test for exponentiality is based on the following statistic:

W = \frac{n(\overline{X} - X_{(1)})^2}{(n - 1)∑_{i=1}^n{(X_i - \overline{X})^2}}.

The p-value is computed by Monte Carlo simulation.

Value

A list with class "htest" containing the following components:

statistic

the value of the Shapiro-Wilk statistic.

p.value

the p-value for the test.

method

the character string "Shapiro-Wilk test for exponentiality".

data.name

a character string giving the name(s) of the data.

Author(s)

Alexey Novikov and Ruslan Pusev

References

Shapiro, S.S. and Wilk, M.B. (1972): An analysis of variance test for the exponential distribution (complete samples). — Technometrics, vol. 14, pp. 355-370.

Examples

1
2

Example output

	Shapiro-Wilk test for exponentiality

data:  rexp(100)
W = 0.0099312, p-value = 0.416


	Shapiro-Wilk test for exponentiality

data:  rchisq(100, 1)
W = 0.0051621, p-value < 2.2e-16

exptest documentation built on May 1, 2019, 8:01 p.m.