# Gel, Y.R., Miao, W. and Gastwirth, J.L. (2007), 
# 'Robust directed tests of normality against heavy-tailed alternatives', 
# Computational Statistics & Data Analysis, Vol. 51, pp. 2734-2746. 

# Regenerate tables 2,3 and 4 from gel2007 (page 2741) 
law.index <- 2
M <- 10^4
vectn <- c(20,50,100) 
stat.indices <- c(21,7,33,17,1) 
levels <- 0.05
alter <- list(stat21=4,stat7=3,stat33=3,stat17=2,stat1=3) 
law.indices <- c(8,35,4,1,7,6,6,6,3,10,31) 
parlaws <- list(law8=c(3),law35=c(1),law4=c(0,1),law1=c(0,1),law7=c(0,1),law6=c(2,2),law6=c(3,3),law6=c(4,4),law3=c(0,1),law10=c(0,1),law31=c(0.1,0,3)) 
for (n in vectn) { 
  critval <- many.crit(law.index,stat.indices,M,n,levels,alter,law.pars=NULL,parstats=NULL) 
  tables234 <- powcomp.fast(law.indices,stat.indices,n,M,level,critval=critval,alter,parlaws,parstats=NULL,nbclus=1,null.law.index=law.index) 
  print(tables234,digits=0,latex.output=FALSE)
} 

# LaTex output : latex.output=TRUE 


