Learn R Programming

MVar (version 2.0.4)

GSVD: Generalized Singular Value Decomposition (GSVD).

Description

Given the matrix \(A\) of order \(nxm\), the generalized singular value decomposition (GSVD) involves the use of two sets of positive square matrices of order \(nxn\) and \(mxm\) respectively. These two matrices express constraints imposed, respectively, on the lines and columns of \(A\).

Usage

GSVD(Data, PLin = NULL, PCol = NULL)

Arguments

Data

Matrix used for decomposition.

PLin

Weight for rows.

PCol

Weight for columns

Value

d

Eigenvalues, that is, line vector with singular values of the decomposition.

u

Eigenvectors referring rows.

v

Eigenvectors referring columns.

Details

If PLin or PCol is not used, it will be calculated as the usual singular value decomposition.

References

ABDI, H. Singular Value Decomposition (SVD) and Generalized Singular Value Decomposition (GSVD). In: SALKIND, N. J. (Ed.). Encyclopedia of measurement and statistics. Thousand Oaks: Sage, 2007. p. 907-912.

Examples

Run this code
# NOT RUN {
M = matrix(c(1,2,3,4,5,6,7,8,9,10,11,12), nrow = 4, ncol = 3)

svd(M)  # Usual Singular Value Decomposition

GSVD(M) # GSVD with the same previous results

# GSVD with weights for rows and columns
GSVD(M, PLin = c(0.1,0.5,2,1.5), PCol = c(1.3,2,0.8)) 
# }

Run the code above in your browser using DataLab