Format data from the Human Cause-of-Death Database for use in the MortHump package

Share:

Description

This is a data grabber for the Human Cause-of-death database that select and format age- and cause-specific death counts, exposures, rates and cause-of-death labels. It formats the data so that they can be properly used by codhump function.

Usage

1
HCD2MH(country, year, sex, list, unabr = FALSE, path)

Arguments

country

HCD population letter code

year

year for which the data is required

sex

sex for which the data is required ("females", "males" or "total")

list

cause-of-death classification ("short", "interm" or "full")

unabr

should the data be unabridged into single-year values

path

path to the HCD folder for local access

Details

This function assumes that all the HCD data are stored into a single folder, containing itself country-specific folders. To constitute this folder, download the zipped datasets by country, and unzip the country folders. The list of available countries and period coverage can be found on the HCD website.

The Intermediate and short cause-of-death classifications can be found on the HCD website. The full list depends on each country and can be found on the country pages.

Value

HCD2MH returns a list of six elements:

mxc

a matrix of cause- and age-specific death rates (age in rows, causes in columns)

dxc

a matrix of cause- and age-specific death counts (age in rows, causes in columns)

nx

a vector of age-specific exposures

x

a vector of mid-point for each age interval

age

a character vector of age labels

inter

a matrix containing the endpoints of the age intervals

lab

a character vector of short names for the causes of death

References

Human Cause-of-Death Database. French Institute for Demographic Studies (France) and Max Planck Institute for Demographic Research (Germany). Available at www.causeofdeath.org (data downloaded in May 2016).

See Also

codhump

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.