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.
HCD2MH(country, year, sex, list, unabr = FALSE, path)
HCD population letter code
year for which the data is required
sex for which the data is required ("females", "males" or "total")
cause-of-death classification ("short", "interm" or "full")
should the data be unabridged into single-year values
path to the HCD folder for local access
HCD2MH returns a list of six elements:
a matrix of cause- and age-specific death rates (age in rows, causes in columns)
a matrix of cause- and age-specific death counts (age in rows, causes in columns)
a vector of age-specific exposures
a vector of mid-point for each age interval
a character vector of age labels
a matrix containing the endpoints of the age intervals
a data frame containing the colomn index, short names and labels for the causes of death
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.
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).