Learn R Programming

SimNPH (version 0.5.7)

r2m: Functions to Convert Between Days and Months and Medians and Rates

Description

Some functions to convert between days and months and rates and medians.

Usage

r2m(lambda)

m2r(med)

m2d(mon)

d2m(day)

Value

median survival time in months (r2m)

hazard rate per day (m2r)

time in days (m2d)

time in months (d2m)

Arguments

lambda

hazard rate

med

median in months

mon

time in months

day

time in days

Functions

  • r2m(): daily rate to median in months

  • m2r(): median to months to daily rate

  • m2d(): months to days

  • d2m(): days to months

Examples

Run this code
r2m(0.002)
m2r(12)
m2d(1)
d2m(31)

Run the code above in your browser using DataLab