# Age-ratio test on survey dataset from Kabul, Afghanistan (`dp.ex02`)
# with an age ratio of 0.85
svy <- dp.ex02
ageRatioTest(svy$age, ratio = 0.85)
# The age ratio test applied to data for each sex separately
by(svy$age, svy$sex, ageRatioTest, ratio = 0.85)
Run the code above in your browser using DataLab