compact_svd: Compact Singular Value Decomposition of Design Matrix

Description Usage Arguments Value Functions Examples

Description

Singular value decomposition is performed, where only the first r singular values and (left/right) singular vectors are retained, where r is the matrix rank. The design matrix is assumed to be the concatenation between fixed effects and random effects design matrices.

Usage

1
2
3
compact_svd(x, fixed_index, rand_index)

compact_svd_list(x_list, fixef_index, ranef_index)

Arguments

x, x_list

A matrix or list of matrices.

fixef_index

An integer vector specifying which columns of x have fixed effects coefficients.

ranef_index

An integer vector specifying which columns of x have random effects coefficients.

Value

An object of class gammmbest containing

rank

The rank of the design matrix.

D

A diagonal matrix of nonzero singular values.

U

A matrix whose columns contain left singular vectors.

V

A matrix whose columns contain right singular vectors.

V1

The right singular vectors associated with fixed effects

V2

The right singular vectors associated with random effects

Functions

Examples

1
2
3
x <- matrix(1:9, 3, 3)
xx <- cbind(x, x)
compact_svd(xx, fixed_index = 1:3, rand_index = 4:6)

kschmaus/gammmbest documentation built on May 7, 2019, 9 p.m.