With compare_cols = FALSE, transforms each column of X so that the values lie between 0 and 1, with 0 being the lowest rank, and 1 being the highest. By “highest rank”, we mean that the entry has the largest (most positive) value amongst all the entries in the column. With compare_cols = TRUE, the “least extreme” relative ranks are obtained by comparing to the ranks of the other columns. This results in values between -1 (when the rank is 0 in the current column and 1 in all other columns) and +1 (when the rank is 1 in the current column and 0 in all other columns). When the current column has identical rank to one or more columns, the “least extreme” relative rank is zero.

rank_transform_effects_matrix(
  effects_matrix,
  compare_cols = FALSE,
  compare_dims = seq(1, ncol(effects_matrix))
)

Arguments

effects_matrix

The n x m matrix X.

compare_cols

When compare_cols = TRUE, instead of returning the ranks, the “least extreme” relative ranks are returned.

compare_dims

Describe compare_dims argument here.

Value

The n x m rank-transformed effects matrix.