Description Usage Arguments Details Value
This method is used to interpolate counts based on the Sprague formula. It is based on the first stage of the Sprague R script prepared by Thomas Buettner and Patrick Gerland, itself based on the description in Siegel and Swanson, 2004, p. 727.
1 | graduate_sprague(Value, Age, AgeInt, OAG = TRUE)
|
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 = |
Ages should refer to lower age bounds, ending in the open age group
in the last row (not a closed terminal age). Dimension labeling is necessary.
There must be at least six age groups (including the open group). One year of
data will work as well, as long as it's given as or coercible to a
single-column matrix. This method may produce negative values, most likely in
the youngest or oldest ages. This case is dealt with in the graduate()
wrapper function but not in this function.
If the highest age does not end in a 0 or 5, and OAG == TRUE
, then the
open age will be grouped down to the next highest age ending in 0 or 5. If
the highest age does not end in a 0 or 5, and OAG == FALSE
, then
results extend to single ages covering the entire 5-year age group.
Numeric vector of counts split into single ages.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.