Function to convert mortality rates to probabilities of death
mx2qx(mx, ax = 0.5)
A vector of death probabilities
mortality rates vector
the average number of years lived between ages x and x +1 by individuals who die in that interval
Function to convert mortality rates to probabilities of death
mxt
, qxt
, qx2mx
#using some recursion
qx2mx(mx2qx(.2))
Run the code above in your browser using DataLab