OPLS_NIPALS_DNR: OPLS_NIPALS_DNR

View source: R/ComDim_OPLS.R

OPLS_NIPALS_DNRR Documentation

OPLS_NIPALS_DNR

Description

One NIPALS OPLS step on a (lambda-weighted) concatenated block matrix. Computes one predictive component and one orthogonal component in a single pass. This function is the recommended building block for constructing an OPLS-based FUN argument for ComDim_y() when nort > 0. For nort = 0 (plain PLS) a simpler PLS wrapper is sufficient.

Usage

OPLS_NIPALS_DNR(W = W, y = y, threshold = 1e-10)

Arguments

W

Numeric matrix (n x p): the concatenated, lambda-weighted blocks as passed by ComDim_y().

y

Numeric matrix (n x q): the response block (dummy matrix for discriminant analysis, numeric matrix for regression). Only the first column drives the NIPALS u-score iteration; all columns are used to compute the Y-loading q.

threshold

Convergence threshold for the u-score update (default 1e-10).

Value

A named list:

t_pred

Predictive X-score (length n).

w_pred

Predictive X-weight (length p), L2-normalised.

p

X-loading (length p).

q

Y-loading (length q = ncol(y)).

u

Y-score (length n).

t_ort

Orthogonal X-score (length n).

w_ort

Orthogonal X-weight (length p), L2-normalised.

p_ort

Orthogonal X-loading (length p).

See Also

ComDim_y for the multi-block OPLS wrapper that uses this function.


R.ComDim documentation built on May 13, 2026, 9:07 a.m.