psi.lks.exp.test: Lilliefors test for exponentiality

Description Usage Arguments Details Value Note Author(s) Examples

View source: R/psistat.R

Description

Performs Lilliefors test for exponentiality.

Usage

1
psi.lks.exp.test(x, Nsim = 1000, ...)

Arguments

x

vector of observations.

Nsim

number of simulations to perform, see details.

...

other parameters.

Details

psi.lks.exp.test performs a Lilliefors test for exponentiality, i.e. the null hypothesis is that x is a random sample from the exponential distribution with some (unspecified) degrees of freedom.

The p-value is calculated through simulation controlled by the argument Nsim (larger Nsim should give a more reliable value).

todo: remove the '...' argument, it should not be used.

Value

A list with class '"htest"' (modelled after the result of ks.test) containing the following components:

statistic

the value of the test statistic.

p.value

the p-value of the test.

alternative

a character string describing the alternative hypothesis.

method

a character string indicating what type of test was performed.

data.name

a character string giving the name(s) of the data.

Note

Since the p-value is calculated through simulation, calling psi.lks.exp.test twice with the same data will not give identical results. The computed p-values should be only slightly different (especially with large Nsim) and will hardly ever lead to contradicting decisions.

If you want the same result each time set the random seed before calling the function to a particular value, say set.seed(1234).

Author(s)

Georgi N. Boshnakov

Examples

1
psi.lks.exp.test(rexp(10),Nsim=10000)

GeoBosh/psistat documentation built on Nov. 19, 2020, 8:19 p.m.