rankorderdata: Rank order data

View source: R/RankOrderData.R

rankorderdataR Documentation

Rank order data

Description

Function rankorderdata rank-orders the data with respect to some variable (diagnostic variable).

Usage

rankorderdata(score, class, dec = TRUE)

Arguments

score

A vector containing (diagnostic) scores.

class

A vector containing the class.

dec

Logical. TRUE for descending order, FALSE for ascending order.

Value

A dataframe, rank-ordered with respect to the score.

Comment

rankorderdata is used internally in other function(s) of ROCit.

Author(s)

Riaz Khan, mdriazahmed.khan@jacks.sdstate.edu

Examples

score <- c(0.4 * runif(20) + 0.2, 0.4*runif(20))
class <- c(rep("A",20), rep("B",20))
returndata <- rankorderdata(score, class, dec = FALSE)
returndata


ROCit documentation built on May 29, 2024, 2:15 a.m.