components.bage_ssvd {bage} | R Documentation |
Extract Components used by SVD Summary
Description
Extract the matrix and offset used by a scaled SVD summary of a demographic database.
Usage
## S3 method for class 'bage_ssvd'
components(object, n_comp = NULL, indep = NULL, age_labels = NULL, ...)
Arguments
object |
An object of class |
n_comp |
The number of components.
The default is half the total number of
components of |
indep |
Whether to use independent or
joint SVDs for each sex/gender. If
no value is supplied, an SVD with no
sex/gender dimension is used. Note that the
default is different from |
age_labels |
Age labels for the desired age or age-sex profile. If no labels are supplied, the most detailed profile available is used. |
... |
Not currently used. |
Value
A tibble with the offset and components.
Scaled SVDs of demographic databases in bage
-
HMD
Mortality rates from the Human Mortality Database. -
HFD
Fertility rates from the Human Fertility Database.
See Also
-
generate() Randomly generate age-profiles, or age-sex profiles, based on a scaled SVD summary.
-
SVD()
SVD prior for terms involving age. -
SVD_AR1()
,SVD_AR()
,SVD_RW()
,SVD_RW2()
Dynamic SVD priors for terms involving age and time. -
poputils::age_labels()
Generate age labels.
Examples
## females and males combined
components(LFP, n_comp = 3)
## females and males modelled independently
components(LFP, indep = TRUE, n_comp = 3)
## joint model for females and males
components(LFP, indep = FALSE, n_comp = 3)
## specify age groups
labels <- poputils::age_labels(type = "five", min = 15, max = 60)
components(LFP, age_labels = labels)