rankorderdata: Rank order data

Description Usage Arguments Value Comment Author(s) Examples

View source: R/RankOrderData.R

Description

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

Usage

1
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

1
2
3
4
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 July 1, 2020, 11:28 p.m.