Learn R Programming

mixedCCA (version 1.6.2)

find_w12bic: Internal mixedCCA function finding w1 and w2 given R1, R2 and R12

Description

Internal mixedCCA function finding w1 and w2 given R1, R2 and R12

Usage

find_w12bic(
  n,
  R1,
  R2,
  R12,
  lamseq1,
  lamseq2,
  w1init,
  w2init,
  BICtype,
  maxiter = 100,
  tol = 0.01,
  trace = FALSE,
  lassoverbose = FALSE
)

Value

find_w12bic returns a data.frame containing

  • w1: estimated canonical direction \(w1\).

  • w2: estimated canonical direction \(w2\).

  • w1trace: a matrix, of which column is the estimated canonical direction \(w1\) at each iteration. The number of columns is the number of iteration until the convergence.

  • w2trace: a matrix, of which column is the estimated canonical direction \(w2\) at each iteration. The number of columns is the number of iteration until the convergence.

  • lam1.iter: For each iteration, what lambda value is selected for \(w1\) is stored.

  • lam2.iter: For each iteration, what lambda value is selected for \(w2\) is stored.

  • obj: objective function value without penalty: \(w1^T * R12 * w2\). If lamseq1 and lamseq2 are scalar, then original objective function including penalty part will be used.

Arguments

n

Sample size

R1

Correlation matrix of dataset X1 (p1 by p1)

R2

Correlation matrix of dataset X2 (p2 by p2)

R12

Correlation matrix between the dataset X1 and the dataset X2 (p1 by p2)

lamseq1

A sequence of lambda values for the datasets X1. It can be a scalar (a vector of one value). should be the same length with lamseq2.

lamseq2

A sequence of lambda values for the datasets X2. It can be a scalar (a vector of one value). should be the same length with lamseq1.

w1init

An initial vector of length p1 for canonical direction \(w1\).

w2init

An initial vector of length p1 for canonical direction \(w2\).

BICtype

Either 1 or 2: For more details for two options, see the reference.

maxiter

The maximum number of iterations allowed.

tol

The desired accuracy (convergence tolerance).

trace

If trace = TRUE, progress per each iteration will be printed. The default value is FALSE.

lassoverbose

If lassoverbose = TRUE, all warnings from lassobic optimization regarding convergence will be printed. The default value is lassoverbose = FALSE.

References

Yoon G., Carroll R.J. and Gaynanova I. (2020) "Sparse semiparametric canonical correlation analysis for data of mixed types" <doi:10.1093/biomet/asaa007>.