de.test: Tests for the Laplace or double exponential distribution

Description Usage Arguments Details Value Author(s) References Examples

Description

Transformation and ratio tests for the Laplace distribution by Gonzalez-Estrada and Villasenor (2016).

Usage

1
laplace_test(x, method = "transf", N = 10^5)

Arguments

x

a numeric data vector containing a random sample of real numbers.

method

the type of test to be performed. Two available options are "transf" and "ratio". Default option is "transf".

N

number of Monte Carlo samples used to approximate the p-value of the test when the "ratio" option is chosen and the sample size is less than 500. Default is N = 10^5.

Details

When "transf" option is chosen, a transformation to approximately exponential random variables is performed and the exponentiality hypothesis is assessed using Anderson-Darling test.

When "ratio" option is chosen, a test based on the ratio of two estimators of the scale parameter is performed. For samples of size n < 500, the p-value of this test is approximated by Monte Carlo simulation. Otherwise, it is approximated by the standard normal cumulative distribution function.

Value

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

statistic

the calculated value of the test statistic.

p.value

approximated p-value of the test.

method

a character string giving the name of the method used for testing the null hypothesis.

data.name

a character string giving the name of the data set.

Author(s)

Elizabeth Gonzalez-Estrada egonzalez@colpos.mx, Jose A. Villasenor

References

Gonzalez-Estrada, E. and Villasenor, J.A. (2016). A ratio goodness-of-fit test for the Laplace distribution. Statistics and Probability Letters, 119, 30-35. https://doi.org/10.1016/j.spl.2016.07.003

Examples

1
2
3
4
5
6
7
# Example 1:  testing the Laplace distribution hypothesis using "transf" option
x <- rnorm(50)   # simulating a random sample from a normal distribution
laplace_test(x)    

# Example 2: testing the Laplace distribution hypothesis using "ratio" option
x <- rt(60,4)    # simulating a random sample from Student's t distribution with 4 d.f.
laplace_test(x, method = "ratio")

goft documentation built on July 1, 2020, 5:56 p.m.

Related to de.test in goft...