# Choi, B. and Kim, K. (2006), 
# 'Testing goodness-of-fit for Laplace distribution based on maximum entropy', 
# Statistics, Vol. 40, No. 6, pp. 517-531. 

# Regenerate table 7 from choi2006 (page 525) 
law.index <- 1
M <- 5*10^4
vectn <- c(10,20,35,50) 
levels <- 0.05
stat.indices <- c(51,53,52,43,44,42,45,46) 
law.indices <- c(9,10,11,28) 
alter <- list(stat51=4,stat53=4,stat52=4,stat43=3,stat44=3,stat42=3,stat45=3,stat46=3) 
parlaws <- list(law9=c(2),law10=c(0,0.5),law11=c(2,1),law28=c(0,1,0)) 

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

# LaTex output : latex.output=TRUE 


