F4-mu.GE: GE Matrix

Description Usage Arguments Details Value Algorithm Author(s) Examples

Description

mu.GE returns a matrix with each element denoting the logical value if one value is greater than or equal to another.

Usage

1
mu.GE(x, y=x)

Arguments

x

data matrix, variables as columns

y

second data matrix, optional

Details

The (i,j) entry of GE matrix is 1 if \code{x_i >= y_j}, 0 otherwise. The square matrix GE is stored by column in a vector.

Value

a vector which contains the GE matrix.

Algorithm

1
2
3
4
5
6
7
8
 
mu.GE <- function(x, y=x) {
  <\dots>
  if (length(y)>1)
    apply(rbind(x,y),2,mu.GE,nrow(x))
  else 
    as.numeric(NAtoZer(outer(x[1:y],x[-(1:y)],">=")))
}

Author(s)

Knut M. Wittkowski kmw@rockefeller.edu, Tingting Song ttsong@gmail.com

Examples

1
2
a <- c(4, 2, 5, 1, 4, NA, 6)
mu.GE(a)

muStat documentation built on May 2, 2019, 5:12 a.m.

Related to F4-mu.GE in muStat...