Learn R Programming

Correlplot (version 1.1.3)

FitAllModelsRxy: Fit all Models for the Between-Set Correlation Matrix

Description

Function FitAllModelsRxy fits five models to approximate a between set correlation matrix. It calculates loss and RMSE for a canonical correlation analysis, and for four iterative alternating least squares algorithms that adjust the matrix for scalar, row and/or column effects.

Usage

FitAllModelsRxy(Rxy, Rxx, Ryy, eps = 1e-08, itmax = 1000, verbose = FALSE, digits = 12,
                ndim = 2)

Value

A dataframe with loss and RMSE statistics.

Arguments

Rxy

The between set correlation matrix.

Rxx

The correlation matrix of the X variables.

Ryy

The correlation matrix of the Y variables.

eps

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

itmax

The maximum number of iterations.

verbose

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

digits

Number of digits used for the final output.

ndim

Number of dimensions for the low-rank approximation.

Author

Jan Graffelman (jan.graffelman@upc.edu)

Details

Function FitAllModelsRxy is useful for deciding if an adjustment is useful, and if so, which adjustment is most suitable.

References

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

See Also

FitRxy

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)
  Results <- FitAllModelsRxy(Rxy,Rxx,Ryy,verbose=FALSE,
                       eps=1e-08,ndim=2)
  print(round(Results,6))

Run the code above in your browser using DataLab