Compute cohort index from age and period index
coh(agegroup, period, noa, periods_per_agegroup)
cohort index
# last agegroup in first period equals first cohort
coh(10, 1, 10, 5)
#> [1] 1
# first agegroup in last period equals last cohort
coh(1, 8, 10, 5)
#> [1] 53