getsurvival {ROCit} | R Documentation |
Survival Probability
Description
Function getsurvival
calculates survival probability
from an object of class "density" at specified value.
Usage
getsurvival(x, cutoff)
Arguments
x |
An object of class "density". |
cutoff |
Value at which survival probability will be calculated. |
Details
The survival function S, of a random variable X
is defined by,
S(X=x) = 1 - F(X=x)
where F
is the cumulative density
function (CDF) of X
.
Value
Survival probability.
Comment
getsurvival
is used internally in other function(s) of ROCit.
Examples
data("Loan")
k <- density(Loan$Income)
# What portion have income over 100,000
getsurvival(k,100000)
[Package ROCit version 2.1.2 Index]