psi.lks.exp.test.Rd
Performs Lilliefors test for exponentiality.
psi.lks.exp.test(x, Nsim = 1000, ...)
x | vector of observations. |
---|---|
Nsim | number of simulations to perform, see details. |
... | other parameters. |
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.
A list with class '"htest"' (modelled after the result of
ks.test
) containing the following components:
the value of the test statistic.
the p-value of the test.
a character string describing the alternative hypothesis.
a character string indicating what type of test was performed.
a character string giving the name(s) of the data.
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)
.
#> #> One-sample Lilliefors test for exponential distribution #> #> data: rexp(10) #> Dn.Lillie.exp = 0.15661, p-value = 0.8578 #> alternative hypothesis: two-sided #>