Learn R Programming

Correlplot (version 1.1.3)

FitRxy: Low rank approximation of the between-set correlation matrix

Description

Function FitRxy fits a low-rank approximation to a between-set correlation, while allowing for adjustment by a scalar or column and/or row effects.

Usage

FitRxy(Rxy, R, C, ndim = 2, itmax = 1000, eps = 1e-08, verbose = TRUE,
adjust = "row", alpha = 1, lambda.eps = 1e-12)

Value

y

The low-rank approximation to the correlation matrix.

Fc

Biplot coordinates for the rows of Rxy.

Gc

Biplot coordinates for the columns of Rxy.

itel

Number of iterations until convergence.

re

Estimated row adjustments.

ce

Estimated column adjustments.

delta

Estimated scalar adjustment.

loss

Value of the loss function upon convergence.

rmse.approximation

The root-mean-squared-error of the low-rank approximation to Rxy.

convergence

TRUE if the decrease in the loss function drops below eps.

Arguments

Rxy

The between-set correlation matrix.

R

The GLS weight matrix for the rows.

C

The GLS weight matrix for the columns.

ndim

The rank of the approximation (two by default).

itmax

The maximum number of iterations.

eps

The numerical criterion for convergence (1e-08 by default).

verbose

Print the iteration history (verbose=TRUE) or not.

adjust

The type of adjustment. Should be: "delta" (only a scalar adjustment), "col" (only adjument of the columns), "row" (only adjustment of the rows) or "both" (row and column adjustments).

alpha

Scaling factor for the biplot coordinates (1 = principal coordinates, 0 = standard coordinates, 0.5 = symmetric coordinates).

lambda.eps

The numerical criterion for considering small negative eigenvalues zero or not.

Author

Jan Graffelman (jan.graffelman@upc.edu)

Details

Function FitRxy finds a low-rank approximation to the between-set correlation matrix while allowing for scalar, row and/or column adjustments. It implements an alternating least squares algorithm.

References

Graffelman (2026) On the approximation of the between-set correlation matrix. Preprint.

See Also

wAddPCA

Examples

Run this code
  data(achievement)
  X <- achievement[,1:3]
  Y <- achievement[,4:ncol(achievement)]
  Rxy  <- cor(X,Y)
  Rxx  <- cor(X)
  Ryy  <- cor(Y)
  out.delta <- FitRxy(Rxy,solve(Rxx),solve(Ryy),
                  adjust="delta",eps=1e-08,
                  verbose=FALSE)

Run the code above in your browser using DataLab