Skip to contents

Sparse Correspondence Analysis based on the "projected Penalized Matrix Decomposition"

Usage

sCAwithPMD(
  DATA,
  dimensions = 2L,
  doublecentering = TRUE,
  s1 = rep(1, dimensions),
  s2 = rep(1, dimensions)
)

Arguments

DATA

the I times J contingency table

dimensions,

integer, the number of dimensions to return (default to 2)

doublecentering,

logical: should the data be double-centered (default to TRUE)

s1,

vector of size 'dimensions" containing the left side regularization parameters, the coefficients in this vector should belong to the interval 1, sqrt(I), (default to rep(1, dimensions))

s2,

vector of size 'dimensions" containing the left side regularization parameters, the coefficients in this vector should belong to the interval 1, sqrt(J), (default to rep(1, dimensions))

Value

An object containing all the necessary outputs for sparse CA

Examples

sCAwithPMD(HairEyeColor[,,1],dimensions = 3L, s1 = rep(0.5 * sqrt(dim(HairEyeColor)[1]), 3), rdsRight = rep(0.5 * sqrt(dim(HairEyeColor)[2]), 3))
#> Error in sCAwithPMD(HairEyeColor[, , 1], dimensions = 3L, s1 = rep(0.5 *     sqrt(dim(HairEyeColor)[1]), 3), rdsRight = rep(0.5 * sqrt(dim(HairEyeColor)[2]),     3)): unused argument (rdsRight = rep(0.5 * sqrt(dim(HairEyeColor)[2]), 3))