Description Usage Arguments Details Value Author(s) References Examples
View source: R/shapiro.exp.test.R
Performs Shapiro-Wilk test for the composite hypothesis of exponentiality, see e.g. Shapiro and Wilk (1972).
1 | shapiro.exp.test(x, nrepl=2000)
|
x |
a numeric vector of data values. |
nrepl |
the number of replications in Monte Carlo simulation. |
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.
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. |
Alexey Novikov and Ruslan Pusev
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.
1 2 | shapiro.exp.test(rexp(100))
shapiro.exp.test(rchisq(100,1))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.