R/DOM.R

Defines functions DOM

DOM <- function(X){
  J <- colnames(X)
  K <- ncol(X)
  n <- nrow(X)
  DOM.mat <- matrix(0,nrow=K,ncol=K,dimnames=list(J,J))
  for (i in 1:K) for (j in 1:K) DOM.mat[i,j] <- sum(X[,i] > X[,j])/n
  diag(DOM.mat) <- NA 
  return(DOM.mat)
}

Try the mudfold package in your browser

Any scripts or data that you put into this service are public.

mudfold documentation built on Nov. 24, 2022, 5:09 p.m.