# Shapiro, S.S. and Wilk, M.B. (1965), 
# 'An analysis of variance test for normality: Complete samples', 
# Biometrika, Vol. 52, pp. 591-611. 
           
# Regenerate table 7 from shapiro1965 (page 605) 
law.index <- 2
M <- 10^4 
vectn <- 20
stat.indices <- c(21,1,2)
levels <- 0.05
alter <- list(stat21=4,stat1=3,stat2=3) 
law.indices <- c(9,9,9,9,10,3,7,4,6,1) 
parlaws <- list(law9=c(1),law9=c(2),law9=c(4),law9=c(10),law10=c(0,1),law3=c(0,1),law7=c(0,1),law4=c(0,1),law6=c(2,1),law1=c(0,1)) 
critval <- many.crit(law.index,stat.indices,M,vectn,levels,alter,law.pars=NULL,parstats=NULL) 
table7 <- powcomp.fast(law.indices,stat.indices,vectn,M,levels,critval=critval,alter,parlaws,parstats=NULL,nbclus=1,null.law.index=law.index) 
print(table7,digits=0,latex.output=FALSE) 
	
# LaTex output : latex.output=TRUE
