The resulting coefficient matrix is based on the number of rows in
popmat where is assumed that each row of data is a 5-year age group. The final row may be an open or closed age group, as indicated by the
graduate_sprague_expand(Value, Age, OAG = TRUE)
numeric vector, presumably counts in grouped ages
integer vector, lower bounds of age groups
logical, default =
popmat matrix is really just a placeholder in this case. This function is a utility called by the Sprague 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.
Sprague TB (1880). “Explanation of a new formula for interpolation.” Journal of the Institute of Actuaries, 22(4), 270--285. Shryock HS, Siegel JS, Larmon EA (1973). The methods and materials of demography. US Bureau of the Census. Siegel Jacob S, Swanson David A (eds.) (2004). The Methods and Materials of Demography, 2 edition. Elsevier Academic Press, California, USA, San Diego, USA.
a5 <- as.integer(rownames(pop5_mat)) coefsOA <- graduate_sprague_expand(pop5_mat[,1], Age = a5, OAG = TRUE) coefsclosed <- graduate_sprague_expand(pop5_mat[,1], Age = a5, OAG = FALSE) dim(coefsOA)#>  101 21dim(coefsclosed)#>  105 21