Learn R Programming

algebraic.dist (version 0.9.1)

surv: Generic method for obtaining the survival function of an object.

Description

Generic method for obtaining the survival function of an object.

Usage

surv(x, ...)

Value

A function computing the survival function \(S(t) = P(X > t)\).

Arguments

x

The object to obtain the survival function of.

...

Additional arguments to pass.

Examples

Run this code
x <- exponential(1)
S <- surv(x)
S(0)  # 1 (survival at time 0)
S(1)  # exp(-1), approximately 0.368

Run the code above in your browser using DataLab