FitRDeltaQSym {Correlplot}R Documentation

Approximation of a correlation matrix with column adjustment and symmetric low rank factorization

Description

Program FitRDeltaQSym calculates a low rank factorization for a correlation matrix. It adjusts for column effects, and the approximation is therefore asymmetric.

Usage

FitRDeltaQSym(R, W = NULL, nd = 2, eps = 1e-10, delta = 0, q = colMeans(R),
              itmax.inner = 1000, itmax.outer = 1000, verbose = FALSE)

Arguments

R

A correlation matrix

W

A weight matrix (optional)

nd

The rank of the low rank approximation

eps

The convergence criterion

delta

Initial value for the scalar adjustment (zero by default)

q

Initial values for the column adjustments (random by default)

itmax.inner

Maximum number of iterations for the inner loop of the algorithm

itmax.outer

Maximum number of iterations for the outer loop of the algorithm

verbose

Print information or not

Details

Program FitRDeltaQSym implements an iterative algorithm for the low rank factorization of the correlation matrix. It decomposes the correlation matrix as R = delta J + 1 q' + G G' + E. The approximation of R is ultimately asymmetric, but the low rank factorization used for biplotting (G G') is symmetric.

Value

A list object with fields:

delta

The final scalar adjustment

Rhat

The final approximation to the correlation matrix

C

The matrix of biplot vectors

rmse

The root mean squared error

q

The final column adjustments

Author(s)

Jan Graffelman (jan.graffelman@upc.edu)

References

Graffelman, J. and De Leeuw, J. (2023) Improved approximation and visualization of the correlation matrix. The American Statistician pp. 1–20. Available online as latest article doi:10.1080/00031305.2023.2186952

See Also

wAddPCA,ipSymLS,Keller

Examples

data(HeartAttack)
X <- HeartAttack[,1:7]
X[,7] <- log(X[,7])
colnames(X)[7] <- "logPR"
R <- cor(X)
W <- matrix(1, 7, 7)
diag(W) <- 0
out.sym <- FitRDeltaQSym(R, W, eps=1e-6) 
Rhat <- out.sym$Rhat

[Package Correlplot version 1.1.0 Index]