Description Usage Arguments Details Value Author(s) References Examples
Two tests for the Cauchy distribution hypothesis.
1 | cauchy_test(x, N = 10^3, method = "transf")
|
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 |
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).
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. |
Elizabeth Gonzalez-Estrada egonzalez@colpos.mx
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.
1 2 | x <- rnorm(20) # simulating a data set from a normal distribution
cauchy_test(x) # testing the Cauchy distribution hypothesis
|
Loading required package: fitdistrplus
Loading required package: MASS
Loading required package: survival
Loading required package: npsurv
Loading required package: lsei
Test for the Cauchy distribution based on the ratio of two scale
estimators
data: x
T = 0.69108, p-value = 0.036
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.