laplace.test {lawstat}R Documentation

Goodness-of-fit Test Statistics for the Laplace Distribution

Description

Goodness-of-fit test statistics A2 (Anderson–Darling), W2 (Cramer–von Mises), U2 (Watson), D (Kolmogorov–Smirnov), and V (Kuiper). By default, NAs are omitted. For the tables of critical values, see Stephens (1986) and Puig and Stephens (2000).

Usage

laplace.test(y)

Arguments

y

a numeric vector of data values.

Details

The function originally used plaplace function from R package VGAM (Yee 2019), however, to resolve dependencies between packages, the plaplace function was copied entirely to the current package under the name VGAM_plaplace.

Value

A list with the following numeric components:

A2

the Anderson–Darling statistic.

W2

the Cramer–von Mises statistic.

U2

the Watson statistic.

D

the Kolmogorov–Smirnov statistic.

V

the Kuiper statistic.

Author(s)

Kimihiro Noguchi, Yulia R. Gel

References

Puig P, Stephens MA (2000). “Tests of fit for the Laplace distribution, with applications.” Technometrics, 42(4), 417–424. doi:10.1080/00401706.2000.10485715.

Stephens MA (1986). “Tests for the Uniform Distribution.” In D'Agostino RB, Stephens MA (eds.), Goodness-of-fit Techniques, volume 68 of Statistics, textbooks and monographs, chapter 8. Marcel Dekker, New York.

Yee T (2019). VGAM: Vector Generalized Linear and Additive Models. R package version 1.1-2, https://CRAN.R-project.org/package=VGAM.

Examples

## Differences in flood levels example taken from Puig and Stephens (2000)
y <- c(1.96,1.97,3.60,3.80,4.79,5.66,5.76,5.78,6.27,6.30,6.76,7.65,7.84,7.99,8.51,9.18,
     10.13,10.24,10.25,10.43,11.45,11.48,11.75,11.81,12.33,12.78,13.06,13.29,13.98,14.18,
     14.40,16.22,17.06)
laplace.test(y)$D
## [1] 0.9177726
## The critical value at the 0.05 significance level is approximately 0.906.
## Thus, the null hypothesis should be rejected at the 0.05 level.

[Package lawstat version 3.6 Index]