cauchy_test {goft} | R Documentation |
Tests for the Cauchy distribution
Description
Two tests for the Cauchy distribution hypothesis.
Usage
cauchy_test(x, N = 10^3, method = "transf")
Arguments
x |
a numeric data vector containing a random sample of real numbers. |
N |
number of Monte Carlo samples used to approximate the p-value of the tests. Default is N = 10^3. |
method |
character string giving the name of the method to be used for testing the Cauchy distribution hypothesis. Two available options are |
Details
Option "ratio"
performs a test for the Cauchy distribution based on the ratio of the maximum likelihood estimator for the scale parameter and the mean absolute deviation (Gonzalez-Estrada and Villasenor, 2018).
Option "transf"
performs a test based on a data transformation to approximately exponentially distributed data (Villasenor and Gonzalez-Estrada, 2020).
Value
A list with class "htest"
containing the following components.
statistic |
the calculated value of the test statistic. |
p.value |
the approximated p-value of the test. |
method |
the character string "Test for the Cauchy distribution based on the ratio of two scale estimators". |
data.name |
a character string giving the name of the data set. |
Author(s)
Elizabeth Gonzalez-Estrada egonzalez@colpos.mx
References
Gonzalez-Estrada, E. and Villasenor, J.A. (2018). An R package for testing goodness of fit: goft. Journal of Statistical Computation and Simulation, 88 4, 726-751. https://doi.org/10.1080/00949655.2017.1404604
Villasenor, J.A. and Gonzalez-Estrada, E. (2020). Goodness of fit tests for Cauchy distributions using data transformations. In I. Ghosh, N. Balakrishnan and H.K.T. Ng. Contributions of Barry C. Arnold to Statistical Science - Theory and Applications. Springer.
Examples
x <- rnorm(20) # simulating a data set from a normal distribution
cauchy_test(x) # testing the Cauchy distribution hypothesis