Learn R Programming

ROCit (version 2.1.1)

gettptnfpfn-defunct: Get number of TP, FP, TN and FN

Description

Function gettptnfpfn calculates the number of true positive (TP), false positive (FP), true negative (TN) and false negative (FN), if certain depth of the observations are treated as positive. Generally it applies to the observations that are rank-ordered with respect to some diagnostic score.

Usage

gettptnfpfn(x, depth, npos = sum(x), nneg = length(x) - npos)

Value

A numeric vector of length 4 indicating number of TP , FP, TN, FN, respectively.

Arguments

x

A response vector, consisting of only 1's and 0's.

depth

Depth, up to which the positive predictions are made.

npos

Number of positive responses.

nneg

Number of negative responses.

Details

Function gettptnfpfn calculates the number of TP, FP, TN, FN at specified depth. This is designed for numeric 1/0 coding of the responses. Usually it applies to the observations, which are rank-ordered with respect to some diagnostic score.

See Also

ROCit-defunct