Description Usage Arguments Details Value Author(s) See Also Examples
Distribution function, quantile function and random generation for the distribution of the Lilliefors's statistic for exponential hypotheses.
1 2 3 | psi.plks.exp(q, df, Nsim = 1000, lower.tail = TRUE)
psi.qlks.exp(p, df, Nsim = 1000)
psi.rlks.exp(n, df)
|
p |
vector of probabilities. |
q |
vector of quantiles. |
df |
degrees of freedom of the statistic. |
n |
number of observations. |
Nsim |
number of simulations. |
lower.tail |
if TRUE (default) lower tail, otherwise upper tail. |
The prefixes 'p', 'q' and 'r' follow the conventions of distribution functions in base R. The prefix 'psi.' is a reminder that they are in package "psistat".
The distribution function and the quantiles are obtained from a sample
of size Nsim
, ideally large. So, they should not be expected to
give identical results in repeated calls with the same parameters.
Instances of the statistic are obtained by generating random samples
of length df
from the exponential distribution, transforming
each by the formula z=x/xbar, and calculating the
Kolmogorov statistic for the transformed sample, z, with
F0 set to the exponential distribution with rate 1.
todo: pdf
for psi.plks.exp
, a numeric vector of the same length as the
vector q
.
for psi.qlks.exp
, a numeric vector of the same length as the
vector p
.
for psi.rlks.exp
, a numeric vector of length n
representing a sample from the distribution of the Lilliefors KS
statistic for the exponential distribution.
Georgi N. Boshnakov
lillie.test
in package nortest
for the Lilliefors test
for normality.
1 2 3 4 5 6 7 8 9 10 11 12 13 | psi.plks.exp(c(0.1,0.2,0.3,0.4), 10, Nsim=1000)
psi.qlks.exp(c(0.25,0.5,0.75), 10, Nsim=10000)
xi <- seq(0,1,length=100)
yi <- psi.qlks.exp(xi,10,Nsim=10000)
plot(xi,yi)
# aproximate cdf of Lilliefors stat.
plot(ecdf(psi.rlks.exp(1000,10)))
# overlay the cdf of Kolmogorov for comparison.
lines(seq(0,1,length=100), psi.pks(seq(0,1,length=100),10),col="blue")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.