Learn R Programming

relsurv (version 1.2)

transrate.hmd: 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.

Value

  • An object of class ratetable.

Details

This function works with tables organised in the format provided by the Human Mortality Database. The period lifetables, organized by date of death, must be downloaded separately for men and women for each country and the top line deleted. The function only works for tables that have yearly cutpoints for age as well as calendar year (1x1). 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).

See Also

ratetable, transrate.hld, joinrate, transrate.

Examples

Run this code
auspop <- transrate.hmd("fltper_1x1.txt","mltper_1x1.txt")

Run the code above in your browser using DataLab