u_stat: Calculate Mann Whitney U from a vector of ranks

View source: R/HelperFunctions.R

u_statR Documentation

Calculate Mann Whitney U from a vector of ranks

Description

Maximum sum of ranks, rank_sum_max: len_sig * max_Rank Minimum sum of ranks, rank_sum_min: len_sig * (len_sig + 1)/2 Maximum U statistic, Umax: Maximum sum of ranks - Minimum sum of ranks Minimum U statistic, Umin: 0 Normalized U statistic (0 to 1), Unorm: (U - Umin)/(Umax- Umin) = U/Umax UCell score (0 to 1): 1 - Unorm

Usage

u_stat(rank_value, maxRank = 1000, sparse = FALSE)

Arguments

rank_value

A vector of ranks

maxRank

Max number of features to include in ranking

sparse

Whether the vector of ranks is in sparse format

Details

Any rank > maxRank is set to maxRank

Value

Normalized U statistic for the vector of ranks


carmonalab/UCell documentation built on Nov. 4, 2024, 5:32 p.m.