Learn R Programming

ROCit (version 2.1.1)

getsurvival: Survival Probability

Description

Function getsurvival calculates survival probability from an object of class "density" at specified value.

Usage

getsurvival(x, cutoff)

Value

Survival probability.

Arguments

x

An object of class "density".

cutoff

Value at which survival probability will be calculated.

Comment

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

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\).

Examples

Run this code
data("Loan")
k <- density(Loan$Income)
# What portion have income over 100,000
getsurvival(k,100000)


Run the code above in your browser using DataLab