q0_to_m0 {poputils} | R Documentation |
Convert q0 to m0
Description
Convert the probability of dying during infancy (q0) to the mortality rate for infancy (m0).
Usage
q0_to_m0(
q0,
sex = NULL,
a0 = NULL,
infant = c("constant", "linear", "CD", "AK")
)
Arguments
q0 |
Probability of dying in first year of life. A numeric vector or an rvec. |
sex |
Biological sex. A vector the same length
as |
a0 |
Average age at death for infants who die.
Optional. See help for |
infant |
Calculation method.
See help for |
Value
A numeric vector or rvec.
Warning
The term "infant mortality rate" is ambiguous. Demographers sometimes use it to refer to m0 (which is an actual rate) and sometimes use it to refer to q0 (which is a probability.)
See Also
-
lifetab()
Calculate a full life table.
Examples
library(dplyr, warn.conflicts = FALSE)
west_lifetab |>
filter(age == 0, level <= 5) |>
select(level, sex, age, mx, qx) |>
mutate(m0 = q0_to_m0(q0 = qx, sex = sex, infant = "CD"))
[Package poputils version 0.4.1 Index]