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,
  v = NULL,
  n_comp = NULL,
  indep = NULL,
  age_labels = NULL,
  ...
)

Arguments

object

An object of class "bage_ssvd".

v

Version of scaled SVD components to use. If no value is suppled, the most recent version is used.

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 the data contains a sex/gender variable. The default is to use independent SVDs. To obtain results for the total population when the data contains a sex/gender variable, set indep to NA.

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 modeled independently
components(LFP, n_comp = 3)

## joint model for females and males
components(LFP, indep = FALSE, n_comp = 3)

## females and males combined
components(LFP, indep = NA, 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 Nov. 19, 2025, 9:07 a.m.