exp.test: Tests for exponentiality

Description Usage Arguments Details Value Author(s) References Examples

Description

Test based on a data trasformation and Cox-Oakes test for exponentiality.

Usage

1
exp_test(x, method = "transf", N = 10^3)

Arguments

x

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

method

test to be used. Tow available options are "transf" and "ratio". Default option is "transf".

N

number of Monte Carlo samples used to approximate p-values when "transf" option is chosen and the sample size is less than 200. Default is N = 10^3.

Details

Option "transf" performs a test based on a transformation to approximately uniformly distributed variables. If the sample size is larger than 200, the asymptotic null distribution of the test statistic is used to approximate the p-value; otherwise, it is approximated by Monte Carlo simulation.

Option "ratio" performs Cox and Oakes (1984) test.

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

data.name

a character string giving the name of the data set.

Author(s)

Elizabeth Gonzalez-Estrada, Jose A. Villasenor

References

Cox, D.R., Oakes, D., 1984. Analysis of Survival Data. Chapman and Hall/CRC.

Examples

1
2
3
# Testing exponentiality on a simulated random sample from the exponential distribution
x <- rexp(20)
exp_test(x)

goft documentation built on Nov. 17, 2017, 6:17 a.m.