Skip to contents

Return row contributions for each correspondence component

Usage

ca_row_contrib(row_coords, X, eigs)

Arguments

row_coords

row coordinates

X

standardized matrix

eigs

eigs computed by ca_weighted_eigen

Examples

library(FactoMineR2)

X_scaled <- mtcars[, c(2, 8:11)] |>
  ca_standardize()

eigs <- X_scaled |>
  ca_weighted_eigen()

eigs |>
  ca_row_coords() |>
  ca_row_contrib(X_scaled, eigs) |>
  head()
#>           Dim 1        Dim 2      Dim 3     Dim 4       Dim 5
#> [1,] 0.02118797 7.498204e+00 0.35540886 0.4354296 39.44398296
#> [2,] 0.02118797 7.498204e+00 0.35540886 0.4354296  9.15602300
#> [3,] 8.41786188 1.358916e-06 2.12979971 1.7224356  0.05418482
#> [4,] 0.62278581 1.075889e+01 0.02379275 2.0290777  0.20742461
#> [5,] 2.29195452 1.879319e+00 5.36955419 0.4530751  0.63064242
#> [6,] 0.62278581 1.075889e+01 0.02379275 2.0290777  3.13783509