graduate_beers_expand: Create the Beers ordinary or modified coefficient matrix

View source: R/graduate.R

graduate_beers_expandR Documentation

Create the Beers ordinary or modified coefficient matrix

Description

The resulting coefficient matrix is based on the number of rows in Value which must be in 5-year age groups (not abridged). The final row may be an open or closed age group, as indicated by the OAG argument.

Usage

graduate_beers_expand(Value, OAG = FALSE, method = "Mod")

Arguments

Value

numeric vector, presumably counts in grouped ages

OAG

logical, default = TRUE is the final age group open?

method

character. Valid values are "mod" or "ord". Default "mod".

Details

The Value vector is a placeholder in this case. This function is a utility called by the Beers 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.

References

\insertRef

beers1945modifiedDemoTools \insertRefsiegel2004methodsDemoTools

Examples

coefsOA     <- graduate_beers_expand(pop5_mat, OAG = TRUE, method = "mod")
coefsclosed <- graduate_beers_expand(pop5_mat, OAG = FALSE, method = "mod")
dim(graduate_beers_expand(pop5_mat, TRUE))
dim(graduate_beers_expand(pop5_mat, FALSE))
coefso      <- graduate_beers_expand(pop5_mat, OAG = TRUE, method = "ord")

# how to use (under the hood in beers()


timriffe/DemoTools documentation built on Oct. 14, 2024, 12:53 p.m.