View source: R/bage_ssvd-methods.R
components.bage_ssvd | R Documentation |
Extract the matrix and offset used by a scaled SVD summary of a demographic database.
## S3 method for class 'bage_ssvd'
components(object, n_comp = NULL, indep = NULL, age_labels = NULL, ...)
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. |
A tibble with the offset and components.
HMD
Mortality rates from the
Human Mortality Database.
HFD
Fertility rates from the
Human Fertility Database.
LFP
Labor forcce participation
rates from the OECD.
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.
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.