graduate_grabill_expand | R Documentation |
The resulting coefficient matrix is based on the number of rows in popmat
where we assume that each row of data is a 5-year age group and the final row is an open age group to be preserved as such.
graduate_grabill_expand(Value, Age, OAG = TRUE)
Value |
numeric vector, presumably counts in grouped ages |
Age |
integer vector, lower bounds of age groups |
OAG |
logical, default = |
The Value
vector is really just a placeholder in this case. This function is a utility called by the Grabill family of functions, where it is most convenient to just pass in the same matrix being used in those calculations to determine the layout of the coefficient matrix. Note that these coefficients do not constrain population counts to their year totals. This function is called by grabill()
, which ensures matching marginals by 1) blending boundary ages into the Sprague estimated population, and 2) a second constraint on the middle age groups to enforce matching sums.
shryock1973methodsDemoTools
a5 <- as.integer(rownames(pop5_mat))
graduate_grabill_expand(pop5_mat[,1], Age = a5, OAG = TRUE)
graduate_grabill_expand(pop5_mat[,1], Age = a5, OAG = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.