# Rahman, M.M. and Govindarajulu, Z. (1997), 
# 'A modification of the test of Shapiro and Wilk for normality', 
# Journal of Applied Statistics, Vol. 24, Issue 2, pp. 219-236. 

# Regenerate table 4 from rahman1997 (page 232)	 
law.index <- 2
M <- 5*10^3
vectn <- c(10,20,35,50,75,99) 
stat.indices <- c(21,22,23) 
levels <- c(0.01,0.05,0.10) 
alter <- list(stat21=4,stat22=4,stat23=4) 
law.indices <- c(7,4,10,9,9,9,9,3,1,6) 
parlaws <- list(law7=c(0,1),law4=c(0,1),law10=c(0,1),law9=c(1),law9=c(2),law9=c(4),law9=c(10),law3=c(0,1),law1=c(0,1),law6=c(2,1)) 
for (lv in levels) { 
  critval <- many.crit(law.index,stat.indices,M,vectn,lv,alter,law.pars=NULL,parstats=NULL) 
  table2 <- powcomp.fast(law.indices,stat.indices,vectn,M,lv,critval=critval,alter,parlaws,parstats=NULL,nbclus=1,null.law.index=law.index) 
  print(table2,digits=0,latex.output=FALSE) 
} 

# LaTex output : latex.output=TRUE 


