# Meintanis, S.G. (2004), 
# 'A Class of Omnibus Tests for the Laplace Distribution Based on the Empirical Characteristic Function', 
# Communications in Statistics - Theory and Methods, Vol. 33, No. 4, pp. 925-948. 

# Regenerate table 3 from meintanis2004 (page 944) 
law.index <- 1
M <- 10^4
vectn <- c(20,50) 
levels <- c(0.10) 
stat.indices <- c(47,49,47,49,47,49,47,49,47,49,47,49) 

law.indices <- c(2,3,4,7,35,5,6,36,36) 

alter <- list(stat47=3,stat49=3,stat47=3,stat49=3,stat47=3,stat49=3,stat47=3,stat49=3,stat47=3,stat49=3,stat47=3,stat49=3) 

parstats <- list(stat47=0.5,stat49=0.5,stat47=1.0,stat49=1.0,stat47=2.0,stat49=2.0,stat47=4.0,stat49=4.0,stat47=5.0,stat49=5.0,stat47=10.0,stat49=10.0) 

parlaws <- list(law2=c(0,1),law3=c(0,1),law4=c(0,1),law7=c(0,1),law35=c(1),law5=c(2,1),law6=c(2,2),law36=c(0,1,2),law36=c(0,1,3)) 

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

# LaTex output : latex.output=TRUE 


