generate.bage_ssvd {bage} | R Documentation |
Generate Random Age or Age-Sex Profiles
Description
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.
Usage
## S3 method for class 'bage_ssvd'
generate(x, n_draw = 20, n_comp = NULL, indep = NULL, age_labels = NULL, ...)
Arguments
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. |
Value
A tibble
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
-
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.
Examples
## 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)