This index is a composite consisting in the sum of thrice the sex ratio index plus the age ratio index for males and females. This function is therefore a wrapper to ageRatioScore() and sexRatioScore().

ageSexAccuracy(
  Males,
  Females,
  Age,
  ageMin = 0,
  ageMax = max(Age),
  method = "UN",
  adjust = TRUE,
  OAG = TRUE
)

Arguments

Males

numeric. A vector of demographic counts in 5-year age groups for males.

Females

numeric. A vector of demographic counts in 5-year age groups for females.

Age

numeric. A vector of ages corresponding to the lower integer bound of the counts.

ageMin

integer. The lowest age included in calculations. Default 0.

ageMax

integer. The upper age bound used for calculations. Default max(Age).

method

character. Either "UN" (default), "Zelnick", or "Ramachandran",or "das gupta".

adjust

logical. Whether or not to adjust the measure when population size is under one million. Default TRUE.

OAG

logical. Whether or not the top age group is open. Default TRUE.

Value

The value of the index.

Details

Age groups must be of equal intervals. Five year age groups are assumed. If the final element of Males and Females is the open age group, then either make sure ageMax is lower than it, or leave OAG as TRUE so that it is properly removed for calculations. The method argument is passed to ageRatioScore(), where it determines weightings of numerators and denominators, except in the case of Das Gupta, where it's a different method entirely (see ageSexAccuracyDasGupta().

References

United Nations (1952). “Accuracy tests for census age distributions tabulated in five-year and ten-year groups.” Population Bulletin, 59--79. Gupta AD (1955). “Accuracy index of census age distributions.” In United Nations proceedings of the World Population Conference 1954 (Rome), volume IV, 63--74. United States Census Bureau (2017). “Population Analysis System (PAS) Software.” https://www.census.gov/data/software/pas.html, https://www.census.gov/data/software/pas.html.

Examples

Males <- c(4677000,4135000,3825000,3647000,3247000,2802000,2409000,2212000, 1786000,1505000,1390000,984000,745000,537000,346000,335000) Females <- c(4544000,4042000,3735000,3647000,3309000,2793000,2353000,2112000, 1691000,1409000,1241000,887000,697000,525000,348000,366000) Age <- seq(0, 75, by = 5) ageSexAccuracy(Males, Females, Age) # 14.3, matches PAS
#> [1] 14.30763
ageSexAccuracy(Males, Females, Age, ageMax = 75)
#> [1] 14.30763
ageSexAccuracy(Males, Females, Age, ageMax = 75, adjust = FALSE)
#> [1] 14.30763
ageSexAccuracy(Males, Females, Age, method = "Zelnick")
#> [1] 11.78753
ageSexAccuracy(Males, Females, Age, method = "Ramachandran")
#> [1] 10.52855
# Das Gupta not a comparable magnitude, FYI. ageSexAccuracy(Males, Females, Age, method = "Das Gupta")
#> [1] 3.271301