components.bage_ssvd: Extract Components used by SVD Summary

View source: R/bage_ssvd-methods.R

components.bage_ssvdR 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 "bage_ssvd".

n_comp

The number of components. The default is half the total number of components of object.

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 SVD().

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

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)

bage documentation built on April 3, 2025, 8:53 p.m.