Description Usage Arguments Examples
View source: R/ComputeAgeHeapingScores.R
This function serves as a wrapper for five DemoTools functions – check_heaping_roughness(), check_heaping_sawtooth(), check_heaping_whipple(), check_heaping_myers(), check_heaping_noumbissi() – and returns the five summary statistics within specified levels of disaggregation in a given dataset (which must contain single-year age counts) separately for males and females.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | ComputeAgeHeapingScores(
data,
name.disaggregations,
name.age,
name.sex,
name.males,
name.females,
name.population.year1,
name.population.year2,
name.year1,
name.month1,
name.day1,
name.year2,
name.month2,
name.day2,
confirm_single_year_ages = FALSE,
roughness.age.min = NULL,
roughness.age.max = NULL,
Whipple.age.min = NULL,
Whipple.age.max = NULL,
Whipple.digit = NULL,
Myers.age.min = NULL,
Myers.age.max = NULL,
Noumbissi.age.min = NULL,
Noumbissi.age.max = NULL
)
|
data |
data frame that contains at least seven columns representing: (1) single-year age, (2) sex, (3, 4) population counts collected at two different time points (typically adjacent Census years) (5, 6) dates of two different time points (7) the level of subnational disaggregation in additino to sex (e.g. a geographic unit such as a province/state, a sociodemographic category such as education level, or combinations thereof). |
name.disaggregations |
Character string providing the name of the variable in 'data' that represents the levels of subnational disaggregation |
name.age |
Character string providing the name of the variable in 'data' that represents age |
name.sex |
Character string providing the name of the variable in 'data' that represents sex |
name.males |
Character string providing the name of the value of 'name.sex' variable that represents males |
name.females |
Character string providing the name of the value of 'name.sex' variable that represents females |
name.population.year1 |
Character string providing the name of the variable in 'data' that represents the population count in the earlier time period |
name.population.year2 |
Character string providing the name of the variable in 'data' that represents the population count in the later time period |
name.year1 |
Character string providing the name of the variable in 'data' that represents the year of the earlier of the two time periods (e.g. year of the earlier Census) |
name.month1 |
Character string providing the name of the variable in 'data' that represents the month of the earlier of the two time periods (e.g. month of the earlier Census) |
name.day1 |
Character string providing the name of the variable in 'data' that represents the day of the earlier of the two time periods (e.g. day of the earlier Census) |
name.year2 |
Character string providing the name of the variable in 'data' that represents the year of the later of the two time periods (e.g. year of the later Census) |
name.month2 |
Character string providing the name of the variable in 'data' that represents the month of the later of the two time periods (e.g. month of the later Census) |
name.day2 |
Character string providing the name of the variable in 'data' that represents the day of the later of the two time periods (e.g. day of the later Census) |
confirm_single_year_ages |
Logical indicating whether (in contrast to result of variable checks) the 'name.age' does in fact represent single-year ages and the error thrown by the variable checks should be overwritten. Default is FALSE |
roughness.age.min=NULL |
Equivalent to the 'ageMin' argument of 'Demotools::check_heaping_roughness'. Defaults to NULL, which then uses the 'DemoTools' default of 20 |
roughness.age.max=NULL |
Equivalent to the 'ageMax' argument of 'Demotools::check_heaping_roughness'. Defaults to NULL, which then uses the 'DemoTools' default of the highest age that is a multiple of 10 |
Whipple.age.min=NULL |
Equivalent to the 'ageMin' argument of 'Demotools::check_heaping_whipple'. Defaults to NULL, which then uses the 'DemoTools' default of 25 |
Whipple.age.max=NULL |
Equivalent to the 'ageMax' argument of 'Demotools::check_heaping_whipple'. Defaults to NULL, which then uses the 'DemoTools' default of 65 |
Whipple.digit=NULL |
Equivalent to the 'digit' argument of 'Demotools::check_heaping_whipple'. Defaults to NULL, which then uses the 'DemoTools' default of c(0, 5) |
Myers.age.min=NULL |
Equivalent to the 'ageMin' argument of 'Demotools::check_heaping_myers'. Defaults to NULL, which then uses the 'DemoTools' default of 10 |
Myers.age.max=NULL |
Equivalent to the 'ageMax' argument of 'Demotools::check_heaping_myers'. Defaults to NULL, which then uses the 'DemoTools' default of 89 |
Noumbissi.age.min=NULL |
Equivalent to the 'ageMax' argument of 'Demotools::check_heaping_noumbissi'. Defaults to NULL, which then uses the 'DemoTools' default of 20 |
Noumbissi.age.max=NULL |
Equivalent to the 'ageMax' argument of 'Demotools::check_heaping_noumbissi'. Defaults to NULL, which then uses the 'DemoTools' default of 64 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ecuador_age_heaping_scores <- ComputeAgeHeapingScores(data=ecuador_single_year_ages,
name.disaggregations="province_name",
name.males="m",
name.females="f",
name.age="age",
name.sex="sex",
name.population.year1="pop1",
name.population.year2="pop2",
name.year1="year1"
name.month1="month1",
name.day1="day1",
name.year2="year2",
name.month2="month2",
name.day2="day2")
head(ecuador_age_heaping_scores)
tail(ecuador_age_heaping_scores)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.