Description Usage Arguments Details Value Author(s) References Examples

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

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

`x` |
a numeric data vector containing a random sample of real numbers. |

`method` |
the type of test to be performed. Two available options are |

`N` |
number of Monte Carlo samples used to approximate the p-value of the test when the |

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.

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. |

Elizabeth Gonzalez-Estrada [email protected], Jose A. Villasenor

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

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")
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.