Skip to contents

It was used to calculate the cumulative rate up to a defined age limit.

Usage

cumrate(
  count,
  pop,
  rate = NULL,
  eage = 70,
  agewidth = 5,
  sep_zero = TRUE,
  mp = 100,
  decimal = 2
)

Arguments

count

Number of cases number.

pop

Number of population at risk.

rate

Age specific incidence or mortality rate.

eage

The defined age limit of the calculated cumulative rate.

agewidth

The age band width of the age specific rate.

sep_zero

Logical value, if the 0 age group was separate.

mp

A multiplier used to scale the calculated rates. Default is 100.

decimal

Decimals of the calculated rates.

Value

Cumulative rate.

Examples

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/100) 
#>                  49.77