Description Usage Arguments Details Value Note Author(s) Examples
Performs Lilliefors test for exponentiality.
1 | 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:
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. |
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).
Georgi N. Boshnakov
1 | psi.lks.exp.test(rexp(10),Nsim=10000)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.