It was used to calculate the cumulative rate up to a defined age limit.
cumrate(
count,
pop,
rate = NULL,
eage = 70,
agewidth = 5,
sep_zero = TRUE,
mp = 1,
decimal = 6
)
Number of cases number.
Number of population at risk.
Age specific incidence or mortality rate.
The defined age limit of the calculated cumulative rate.
The age band width of the age specific rate.
Logical value, if the 0 age group was separate.
A multiplier used to scale the calculated rates. Default is 1.
Decimals of the calculated rates.
Cumulative rate.
px <- c(20005, 86920, 102502, 151494, 182932, 203107, 240289, 247076, 199665,
163820, 145382, 86789, 69368, 51207, 39112, 20509, 12301, 6586, 1909)
dx <- c(156, 58, 47, 49, 48, 68, 120, 162, 160, 294, 417, 522, 546, 628,
891, 831, 926, 731, 269)
mx <- dx / px
cumrate(mx, eage = 70)
#> Cumulative Rate(1/1)
#> 0.497705