R/ww.exp.test.R

Defines functions ww.exp.test

Documented in ww.exp.test

ww.exp.test<-function(x, nrepl=2000)
{
DNAME <- deparse(substitute(x))
l<-0
n<-length(x)
t<-max(x)/min(x)
for(i in 1:nrepl)
{
s<-rexp(n)
T<-max(s)/min(s)
if (T>t) l=l+1
}
p.value<-l/nrepl
RVAL<-list(statistic=c(Q=t), p.value=p.value, method="Wong and Wong's test for exponentiality",data.name = DNAME)
class(RVAL)<-"htest"
return(RVAL)
}

Try the exptest package in your browser

Any scripts or data that you put into this service are public.

exptest documentation built on May 1, 2019, 8:01 p.m.