graduate_uniform | R Documentation |
Uniformly splits aggregate counts in age groups into single year age groups.
graduate_uniform(Value, Age, AgeInt, OAG = TRUE, OAvalue = 1)
Value |
numeric vector, presumably counts in grouped ages |
Age |
integer vector, lower bounds of age groups |
AgeInt |
integer vector, age interval widths |
OAG |
logical, default = |
OAvalue |
Desired width of open age group. See details. |
Assumes that the population is uniformly distributed across each age interval, and that initial age intervals are integers greater than or equal to 1. If AgeInt
is given, its final value is used as the interval for the final age group. If AgeInt
is missing, then Age
must be given, and the open age group is by default preserved OAvalue
rather than split. To instead split the final age group into, e.g., a 5-year age class, either give AgeInt
, or give Age
, OAG = TRUE
, and OAvalue = 5
. Age
be any age range, it does not need to start at 0.
Numeric vector of counts for single year age groups.
MalePop <- c(9544406,7471790,11590109,11881844,11872503,12968350,
11993151,10033918,14312222,8111523,15311047,6861510,13305117,7454575,
9015381,10325432,9055588,5519173)
Ages <- seq(0, 85, by = 5)
graduate_uniform(MalePop, Age = Ages)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.