# Gulati, Sneh (2011), 
# 'Goodness of fit test for the Rayleigh and the Laplace distributions', 
# International Journal of Applied Mathematics & Statistics, Vol. 24, No. SI-11A, pp. 74-85. 

# Regenerate table 8 from gulati2011 
law.index <- 1
M <- 10^4
vectn <- c(20,50) 
levels <- 0.10
stat.indices <- c(59,43,42,45,44,48,50) 
law.indices <- c(2,3,4,35,5,6,7) 
alter <- list(stat59=3,stat43=3,stat42=3,stat45=3,stat44=3,stat48=3,stat50=3) 
parlaws <- list(law2=c(0,1),law3=c(0,1),law4=c(0,1),law35=c(1),law5=c(2,1),law6=c(2,2),law7=c(0,1)) 

for (n in vectn) { 
  critval <- many.crit(law.index,stat.indices,M,n,levels,alter,law.pars=NULL,parstats=NULL) 
  table8 <- powcomp.fast(law.indices,stat.indices,n,M,levels,critval,alter,parlaws,parstats=NULL,nbclus=1,null.law.index=law.index) 
  print(table8,digits=2,latex.output=FALSE)
} 

# LaTex output : latex.output=TRUE 


