#####################MAG statistics MAG<-function(XX) { Texs<-1/(cumprod(XX)^(1/length(XX))) ### XX is the vector constituted by the ranks of individual gene for k diseases return(Texs[length(XX)]) }