R: GE Matrix

mu.GE {muStat} | R Documentation

## GE Matrix

### Description

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

### Usage

    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

    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

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

[Package muStat version 1.7.0 Index]