# Epps, T.W. and Pulley, L.B. (1983), 
# 'A test of normality based on empirical characteristic function', 
# Biometrika, Vol. 70, No. 3, pp. 723-726. 

# Regenerate table 2 from epps1983 (page 725)  
law.index <- 2
M <- 10^4
vectn <- c(20,50) 
stat.indices <- c(31,31,21,25) 
levels <- 0.05
alter <- list(stat31=3,stat31=3,stat21=4,stat25=4) 
law.indices <- c(6,20,17,9,10,6,8,1,17,3) 
parstats <- list(stat31=c(0.7),stat31=c(1.0),stat21=NA,stat25=NA) 
parlaws <- list(law6=c(2,1),law20=c(1,1),law17=c(-1,2),law9=c(4),law10=c(0,1),law6=c(1,1),law8=c(10),law1=c(0,1),law17=c(0,1),law3=c(0,1)) 
for (n in vectn) { 
  critval <- many.crit(law.index,stat.indices,M,n,levels,alter,law.pars=NULL,parstats=parstats) 
  table2 <- powcomp.fast(law.indices,stat.indices,n,M,level,critval=critval,alter,parlaws,parstats,nbclus=1,null.law.index=law.index) 
  print(table2,digits=0,latex.output=FALSE)
} 

# LaTex output : latex.output=TRUE 


