# 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 4 from meintanis2004 (page 945) 
law.index <- 1
M <- 10^4
vectn <- c(20,50) 
levels <- c(0.10) 
stat.indices <- c(43,42,45,44,48,50,48,50,48,50,48,50,48,50,48,50) 

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

alter <- list(stat43=3,stat42=3,stat45=3,stat44=3,stat48=3,stat50=3,stat48=3,stat50=3,stat48=3,stat50=3,stat48=3,stat50=3,stat48=3,stat50=3,stat48=3,stat50=3) 

parstats <- list(stat43=NA,stat42=NA,stat45=NA,stat44=NA,stat48=0.5,stat50=0.5,stat48=1.0,stat50=1.0,stat48=2.0,stat50=2.0,stat48=4.0,stat50=4.0,stat48=5.0,stat50=5.0,stat48=10.0,stat50=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) 
  table4 <- powcomp.fast(law.indices,stat.indices,n,M,levels,critval,alter,parlaws,parstats=parstats,nbclus=1,null.law.index=law.index) 
  print(table4,digits=0,latex.output=FALSE)
} 

# LaTex output : latex.output=TRUE 


