# Pardo, M. C. (2003), 
# 'A test for uniformity based on informational energy', 
# Statistical Papers, 44, 521-534. 

# Regenerate table 1 from pardo2003 (page 527) 
law.index <- 7
M <- 10^4
vectn <- c(10,20,30,40,50,100) 
levels <- c(0.1,0.05,0.01) 
list.m <- list(n10=c(2,3,4),n20=c(2,3,4,5,6,7,8,9),n30=c(2,3,4,5,6,7,8,9,10), 
               n40=c(2,3,4,5,6,7,8,9,10,15),n50=c(2,3,4,5,6,7,8,9,10,15,20), 
			   n100=c(2,3,4,5,6,7,8,9,10,15,20,30,40)) 

for (i in 1:length(vectn)) { 
  n <- vectn[i] 
  stat.indices <- rep(79,length(list.m[[i]])) 
  list.alter <- rep(3,length(list.m[[i]])) 
  eval(parse(text=paste('alter <- list(',paste('stat',stat.indices,'=c(',list.alter,')',sep='',collapse=','),')',sep=''))) 
  eval(parse(text=paste('parstats <- list(',paste('stat',stat.indices,'=c(',list.m[[i]],')',sep='',collapse=','),')',sep=''))) 
  table1 <- many.crit(law.index,stat.indices,M,n,levels,alter,law.pars=NULL,parstats) 
  print(table1,digits=3,latex.output=FALSE)
} 

# LaTex output : latex.output=TRUE 


