transrate.hmd {relsurv} | R Documentation |
Reorganize Data obtained from Human Mortality Database into a Ratetable Object
Description
The function assists in reorganizing the .txt files obtained from Human Mortality Database (http://www.mortality.org) into a ratetable object.
Usage
transrate.hmd(male, female)
Arguments
male |
a .txt file, containing the data on males. |
female |
a .txt file, containing the data on females. |
Details
This function works automatically with tables organised in the format provided by the Human Mortality Database. Download Life Tables for Males and Females separately from the column named 1x1 (period life tables, organized by date of death, yearly cutpoints for age as well as calendar year).
If you wish to provide the data in the required format by yourself, note that the only two columns needed are calendar year (Year) and probability of death (qx). Death probabilities must be calculated up to age 110 (in yearly intervals).
Value
An object of class ratetable
.
References
Package. Pohar M., Stare J. (2006) "Relative survival analysis in R." Computer Methods and Programs in Biomedicine, 81: 272–278
Relative survival: Pohar, M., Stare, J. (2007) "Making relative survival analysis relatively easy." Computers in biology and medicine, 37: 1741–1749.
See Also
ratetable
, transrate.hld
,
joinrate
, transrate
.
Examples
## Not run:
auspop <- transrate.hmd("mltper_1x1.txt","fltper_1x1.txt")
## End(Not run)