View source: R/bage_ssvd-methods.R
generate.bage_ssvd | R Documentation |
Generate random age or age-sex profiles from
an object of class "bage_ssvd"
. An object
of class "bage_ssvd"
holds results from
an SVD decomposition of demographic
data.
## S3 method for class 'bage_ssvd'
generate(x, n_draw = 20, n_comp = NULL, indep = NULL, age_labels = NULL, ...)
x |
An object of class |
n_draw |
Number of random draws to generate. |
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. |
... |
Unused. Included for generic consistency only. |
A tibble
HMD
Mortality rates from the
Human Mortality Database.
HFD
Fertility rates from the
Human Fertility Database.
LFP
Labor forcce participation
rates from the OECD.
components() Components used by SVD prior.
SVD()
SVD prior for term 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.
## SVD for females and males combined
generate(HMD)
## separate SVDs for females and males
generate(HMD, indep = TRUE)
## specify age groups
labels <- poputils::age_labels(type = "lt", max = 60)
generate(HMD, age_labels = labels)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.