powered by
Generic method for obtaining the survival function of an object.
surv(x, ...)
A function computing the survival function \(S(t) = P(X > t)\).
The object to obtain the survival function of.
Additional arguments to pass.
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