Given population counts in 5-year age groups for males and females, follow Das Gupta's steps to calculate a composite index of the quality of the age and sex structure for a given population.
ageSexAccuracyDasGupta( Males, Females, Age, ageMin = 0, ageMax = max(Age), OAG = TRUE )
numeric. A vector of demographic counts in 5-year age groups for males.
numeric. A vector of demographic counts in 5-year age groups for females.
numeric. A vector of ages corresponding to the lower integer bound of the counts.
integer. The lowest age included in calculations. Default 0.
integer. The upper age bound used for calculations. Default
logical. Whether or not the top age group is open. Default
It is assumed that the terminal age group is open, in which case it is ignored.
OAG = FALSE if the top age is indeed a closed interval that you want included in calculations.
ageMax == max(Age) and
ageMax gets decremented one age class.
Gupta AD (1955). “Accuracy index of census age distributions.” In United Nations proceedings of the World Population Conference 1954 (Rome), volume IV, 63--74.
# data from table for South West Africa (1946) given in reference Males <- c(2365, 2320, 1859, 1554, 1758, 1534, 1404, 1324, 1118, 872, 795, 745, 743, 574) Females <- c(2244, 2248, 1773, 1594, 1616, 1510, 1478, 1320, 1085, 858, 768, 726, 533, 282) Age <- seq(0, 65, by = 5) ageSexAccuracyDasGupta(Males, Females, Age)#>  5.68162# this method is not on the same scale as the others, so don't directly compare. ageSexAccuracy(Males, Females, Age, method = "das gupta")#>  5.68162