View source: R/rank_sum_ratio.R
rank_sum_ratio | R Documentation |
Performs Rank Sum Ratio (RSR) evaluation on a dataset of positive indicators, computing ranks, weighted RSR values, and a linear regression model to fit RSR against probit-transformed ranks. Supports integer or non-integer ranking methods.
rank_sum_ratio(data, w = NULL, method = "int")
data |
Data frame with positive indicator data; first column is an ID column for identifying evaluation objects. |
w |
Numeric vector, weights for indicators (default = equal weights). |
method |
Character scalar, ranking method: "int" for integer ranks or "non-int" for scaled ranks in 1, n (default = "int"). |
The rank_sum_ratio
function implements the RSR method for evaluating
objects based on positive indicators. It ranks the indicators (using integer or
non-integer methods), computes weighted RSR values, adjusts ranks with probit
transformation, and fits a linear regression model to relate RSR to probit values.
The function assumes the first column of data
is an ID column, and weights
(w
) can be provided or set to equal weights by default.
A list containing:
RSRtable
: Data frame with RSR values, ranks, cumulative frequencies,
probit values, and fitted RSR values.
reg
: Linear model object fitting RSR against probit values.
rankTable
: Data frame with ranked indicator values.
# Example data
data = data.frame(ID = c("A", "B", "C"), X1 = c(10, 20, 15), X2 = c(5, 10, 8))
w = c(0.4, 0.6)
rank_sum_ratio(data, w, method = "int")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.