Description Usage Arguments Value Algorithm Author(s) Examples
mu.Sums computes u-scores and weights from a partial ordering.
| 1 2 3 4 | 
| GE | partial ordering | 
| x | data matrix, variables as columns | 
| y | data matrix, variables as columns | 
| frml | see  | 
| dsgn | design of the experiment. | 
| wght | logical flag, if weights should be calculated. | 
| score | u-scores | 
| weight | weights | 
| nBelow | number of observations that are inferior | 
| nAbove | number of observations that are superior | 
| nEqual | number of observations that are equivalent | 
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | mu.Sums <- function(GE, dsgn=1, wght=TRUE) {
    ICW <- function(GE,dsgn) {
        wgt <- colSums(GE|t(GE))        # 0: orig NA, 1: like NA, >1: no NA
        sqrt(wgt*(wgt>1)/if (dsgn!=1) colSums(dsgn) else nrow(GE))
    }
    GE <- sq.matrix(GE)
    nE <- colSums(GE*t(GE)) 
    nA <- colSums(GE) - nE
    nB <- rowSums(GE) - nE
	weight <- ifelse1(wght, ICW(GE,dsgn), rep(1, length(nE)))
	list(score  = (nB-nA) * ifelse(weight==0,NA,1),
		weight = weight,
		nBelow = nB,
		nAbove = nA,
		nEqual = nE)       
}
mu.wScr <- function(x, y=NULL, frml=NULL, dsgn=1, wght=TRUE) 
	mu.Sums(mu.AND(mu.GE(x, y), frml), dsgn=dsgn, wght=wght)
mu.score  <- function(x, y=NULL, frml=NULL, dsgn=1, wght=FALSE) 
	mu.Sums(mu.AND(mu.GE(x, y), frml), dsgn=dsgn, wght=wght)$score
mu.weight <- function(x, y=NULL, frml=NULL, dsgn=1, wght=TRUE) 
	mu.Sums(mu.AND(mu.GE(x, y), frml), dsgn=dsgn, wght=wght)$weight
 | 
Knut M. Wittkowski kmw@rockefeller.edu, Tingting Song ttsong@gmail.com
| 1 2 3 4 5 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.