q0_to_m0 function

Convert q0 to m0

Convert q0 to m0

Convert the probability of dying during infancy (q0) to the mortality rate for infancy (m0).

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 q0, with labels that can be interpreted by reformat_sex(). Needed only when infant is "CD" or "AK".
  • a0: Average age at death for infants who die. Optional. See help for lifetab().
  • infant: Calculation method. See help for lifetab(). Default is "constant".

Returns

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.)

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"))

See Also

  • lifetab() Calculate a full life table.