gen_u5_ax_from_mx | R Documentation |
Add ax onto a data.table for ages <1 and 1-4 years, with algorithm based on under-1 mx.
gen_u5_ax_from_mx(dt, id_cols)
dt |
[
|
id_cols |
[ |
Takes a data.table
with 'age_start', 'age_end', 'sex', and
infant mortality rate ('mx') and adds a column 'ax'.
The following table shows the conversions from 1m0 to 1a0 and 4a1. Note that when sex is "both" the relationship is a mean of the male and female relationships.
Males | Females | |||
1a0: | ||||
If 1m0 >= 0.107 | 0.330 | 0.350 | ||
If 1m0 < 0.107 | 0.045 + 2.684 * 1m0 | 0.053 + 2.800 * 1m0 | ||
4a1: | ||||
If 1m0 >= 0.107 | 1.352 | 1.361 | ||
If 1m0 < 0.107 | 1.651 - 2.816 * 1m0 | 1.522 - 1.518 * 1m0 | ||
Modifies dt
in place with 'ax' column added on.
Preston Samuel H, Patrick H, Michel G. Demography: measuring and modeling population processes. MA: Blackwell Publishing. 2001.
dt <- data.table::data.table(
age_start = c(0, 1),
age_end = c(1, 5),
mx = c(0.09, 0.12),
sex = c("male", "male")
)
gen_u5_ax_from_mx(dt, id_cols = c("age_start", "age_end", "sex"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.