Learn R Programming

npsurvSS (version 1.1.0)

per2haz: Convert exponential parameters

Description

Convert exponential survival percentile or hazard rate to the other.

Usage

per2haz(x, per = 0.5)

Value

survival percentile or hazard rate.

Arguments

x

survival percentile or exponential hazard rate

per

(per)th percentile

Details

$$y=-log(1-per)/x$$

Examples

Run this code
per2haz(14)          # hazard rate for exponential with 14-month median
per2haz(0.05)        # median survival for exponential with hazard rate 0.05
per2haz(14, 0.8)     # hazard rate for exponential with 80th percentile survival at 14 months
per2haz(0.27, 0.8)   # 80th percentile survival for exponential with hazard rate 0.27

Run the code above in your browser using DataLab