scca: Sparse canonical correlation analysis

View source: R/scca.R

sccaR Documentation

Sparse canonical correlation analysis

Description

This function provides penalty-based sparse canonical correlation analysis to get the first pair of canonical vectors.

Usage

scca(x, y, mu1, mu2, eps = 1e-04, scale.x = TRUE, scale.y = TRUE,
  maxstep = 50, trace = FALSE)

Arguments

x

data matrix of explanatory variables

y

data matrix of dependent variables.

mu1

numeric, sparsity penalty parameter for vector u.

mu2

numeric, sparsity penalty parameter for vector v.

eps

numeric, the threshold at which the algorithm terminates.

scale.x

character, "TRUE" or "FALSE", whether or not to scale the variables x. The default is TRUE.

scale.y

character, "TRUE" or "FALSE", whether or not to scale the variables y. The default is TRUE.

maxstep

numeric, maximum iteration steps. The default value is 50.

trace

character, "TRUE" or "FALSE". If TRUE, prints out its screening results of variables.

Value

An 'scca' object that contains the list of the following items.

  • x: data matrix of explanatory variables with centered columns. If scale.x is TRUE, the columns of data matrix are standardized to have mean 0 and standard deviation 1.

  • y: data matrix of dependent variables with centered columns. If scale.y is TRUE, the columns of data matrix are standardized to have mean 0 and standard deviation 1.

  • loading.x: the estimated canonical vector of variables x.

  • loading.y: the estimated canonical vector of variables y.

  • variable.x: the screening results of variables x.

  • variable.y: the screening results of variables y.

  • meanx: column mean of the original dataset x.

  • normx: column standard deviation of the original dataset x.

  • meany: column mean of the original dataset y.

  • normy: column standard deviation of the original dataset y.

See Also

See Also as iscca, meta.scca.

Examples

library(iSFun)
data("simData.cca")
x.scca <- do.call(rbind, simData.cca$x)
y.scca <- do.call(rbind, simData.cca$y)
res_scca <- scca(x = x.scca, y = y.scca, mu1 = 0.1, mu2 = 0.1, eps = 1e-3,
                 scale.x = TRUE, scale.y = TRUE, maxstep = 50, trace = FALSE)

iSFun documentation built on March 18, 2022, 7:41 p.m.

Related to scca in iSFun...