so2m_group: Perform Group Sparse O2PLS

View source: R/OmicsPLS_o2m.R

so2m_groupR Documentation

Perform Group Sparse O2PLS

Description

Perform Group Sparse O2PLS

Usage

so2m_group(
  X,
  Y,
  n,
  nx,
  ny,
  groupx = NULL,
  groupy = NULL,
  keepx = NULL,
  keepy = NULL,
  tol = 1e-10,
  max_iterations = 1000,
  max_iterations_sparsity = 1000
)

Arguments

X

Numeric matrix. Vectors will be coerced to matrix with as.matrix (if this is possible)

Y

Numeric matrix. Vectors will be coerced to matrix with as.matrix (if this is possible)

n

Integer. Number of joint PLS components. Must be positive.

nx

Integer. Number of orthogonal components in X. Negative values are interpreted as 0

ny

Integer. Number of orthogonal components in Y. Negative values are interpreted as 0

groupx

Vector. Used when sparse = TRUE. A vector of strings indicating group names of each X-variable. Its length must be equal to the number of variables in X. The order of group names must corresponds to the order of the variables.

groupy

Vector. Used when sparse = TRUE. A vector of strings indicating group names of each Y-variable. The length must be equal to the number of variables in Y. The order of group names must corresponds to the order of the variables.

keepx

Vector. Used when sparse = TRUE. A vector of length n indicating how many variables (or groups if groupx is provided) to keep in each of the joint component of X. If the input is an integer, all the components will have the same amount of variables or groups retained.

keepy

Vector. Used when sparse = TRUE. A vector of length n indicating how many variables (or groups if groupx is provided) to keep in each of the joint component of Y. If the input is an integer, all the components will have the same amount of variables or groups retained.

tol

Double. Threshold for which the NIPALS method is deemed converged. Must be positive.

max_iterations

Integer. Maximum number of iterations for the NIPALS method.

max_iterations_sparsity

Integer. Used when sparse = TRUE. Maximum number of iterations for the NIPALS method for GO2PLS.

Value

A list containing

Tt

Joint X scores

W.

Joint X loadings

U

Joint Y scores

C.

Joint Y loadings

T_Yosc

Orthogonal X scores

P_Yosc.

Orthogonal X loadings

W_Yosc

Orthogonal X weights

U_Xosc

Orthogonal Y scores

P_Xosc.

Orthogonal Y loadings

C_Xosc

Orthogonal Y weights

B_U

Regression coefficient in Tt ~ U

B_T.

Regression coefficient in U ~ Tt

H_TU

Residuals in Tt in Tt ~ U

H_UT

Residuals in U in U ~ Tt

W_gr

Joint weights of X variables at group level. They are the norms of the X-joint loadings per group

C_gr

Joint weights of Y variables at group level. They are the norms of the Y-joint loadings per group

See Also

o2m


selbouhaddani/OmicsPLS documentation built on Aug. 25, 2022, 9:52 p.m.