Uhat: Fast ranking function

Description Usage Arguments Value Author(s) See Also Examples

View source: R/Uhat.R

Description

Function for computing the scaled ranks for each column of the input matrix. In other words, the values are ranked column-wise and divided by nrow(x) + 1. A "1334" ranking scheme is used where the lowest values is awarded rank 1, second lowest value rank 2, and ties are given the maximum available rank.

Usage

1
Uhat(x)

Arguments

x

A numeric matrix of observations to be ranked. Rows correspond to features and columns to experiments.

Value

A matrix with the same dimensions as x of the scaled ranks.

Author(s)

Anders Ellern Bilgrau <anders.ellern.bilgrau@gmail.com>

See Also

SimulateGMMData, SimulateGMCMData

Examples

1
2
3
4
5
6
data <- SimulateGMMData()
par(mfrow = c(1,2))
plot(data$z, xlab = expression(z[1]), ylab = expression(z[2]))
plot(Uhat(data$z),
     xlab = expression(hat(u)[1]),
     ylab = expression(hat(u)[2]))

Example output



GMCM documentation built on Nov. 6, 2019, 1:08 a.m.