ssvd: Create Object to Hold Data from a Scaled SVD

View source: R/bage_ssvd-constructors.R

ssvdR Documentation

Create Object to Hold Data from a Scaled SVD

Description

Create an object of class "bage_ssvd" to hold results from a scaled Singular Value Decomposition (SVD) with n_comp components.

Usage

ssvd(data)

Arguments

data

A data frame. See Details for description.

Details

data has the following columns:

  • version Vintage of data

  • type Type of decomposition. Choices are "total", "joint", and "indep".

  • labels_age Age labels for individual rows of matrices within matrix and individual elements of vectors within offset.

  • labels_sexgender Sex/gender labels for individual rows of matrices within matrix and individual elements of vectors within offset, or NULL. NULL when sexgender is "total", since in this case results average across sexes/genders.

  • matrix List column of sparse matrices. Must have rownames. Must not have NAs. When type is "total" or "joint", each matrix has n_comp columns. When "type" is "indep", each matrix has 2 * n_comp columns.

  • offset List column of vectors. Must have names, which are identical to the rownames of the corresponding element of matrix.

data would normally be constructed using functions in package bssvd.

Value

An object of class "bage_ssvd".

See Also

  • Scaled SVDs Overview of scaled SVDs implemented in bage

  • SVD() Prior based on scaled SVD

Examples

ssvd(data_wmd)

bage documentation built on Nov. 19, 2025, 9:07 a.m.