getsurvival: Survival Probability

Description Usage Arguments Details Value Comment Examples

View source: R/getSurvival.R

Description

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

Usage

1
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

1
2
3
4
data("Loan")
k <- density(Loan$Income)
# What portion have income over 100,000
getsurvival(k,100000)

ROCit documentation built on July 1, 2020, 11:28 p.m.