# Jarque, Carlos M. and Bera, Anil K. (1987), 
# 'A test for normality of observations and regression residuals',
# International Statistical Review, Vol. 55, No. 2, pp. 163-172. 
           
# Regenerate table 1 from jarque1987 (page 168)
law.index <- 2
M <- 250 
vectn <- c(20,50) 
stat.indices <- c(24,21,22,7) 
levels <- 0.10
alter <- list(stat24=0,stat21=4,stat22=4,stat7=3) 
law.indices <- c(6,8,5,10) 
parlaws <- list(law6=c(3,2),law8=c(5),law5=c(2,1),law10=c(0,1))
for (n in vectn) { 
  critval <- many.crit(law.index,stat.indices,M,n,levels,alter,law.pars=NULL,parstats=NULL)
  table1 <- powcomp.fast(law.indices,stat.indices,n,M,levels,critval=critval,alter,parlaws,parstats=NULL,nbclus=1,null.law.index=law.index) 
  print(table1,digits=2,latex.output=FALSE)
} 

# LaTex output : latex.output=TRUE 
