Statwise.Nonparametric.Rank (Statwise v0.1.0)

Copy Markdown View Source

Ranking helpers for nonparametric tests.

Summary

Functions

Returns the sum of ranks for x after ranking x ++ y.

Returns average ranks compatible with SciPy rankdata(method="average").

Returns tie-group sizes greater than one, sorted descending.

Types

sample()

@type sample() :: [number() | :nan] | Nx.Tensor.t()

Functions

rank_sum(x, y)

@spec rank_sum(sample(), sample()) :: float()

Returns the sum of ranks for x after ranking x ++ y.

ranks(sample, opts \\ [])

@spec ranks(
  sample(),
  keyword()
) :: [float() | :nan]

Returns average ranks compatible with SciPy rankdata(method="average").

tie_counts(sample)

@spec tie_counts(sample()) :: [pos_integer()]

Returns tie-group sizes greater than one, sorted descending.