% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ComDim_OPLS.R
\name{OPLS_NIPALS_DNR}
\alias{OPLS_NIPALS_DNR}
\title{OPLS_NIPALS_DNR}
\usage{
OPLS_NIPALS_DNR(W = W, y = y, threshold = 1e-10)
}
\arguments{
\item{W}{Numeric matrix (n x p): the concatenated, lambda-weighted blocks
as passed by \code{ComDim_y()}.}

\item{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 \code{q}.}

\item{threshold}{Convergence threshold for the u-score update (default
\code{1e-10}).}
}
\value{
A named list:
\describe{
  \item{t_pred}{Predictive X-score (length n).}
  \item{w_pred}{Predictive X-weight (length p), L2-normalised.}
  \item{p}{X-loading (length p).}
  \item{q}{Y-loading (length q = ncol(y)).}
  \item{u}{Y-score (length n).}
  \item{t_ort}{Orthogonal X-score (length n).}
  \item{w_ort}{Orthogonal X-weight (length p), L2-normalised.}
  \item{p_ort}{Orthogonal X-loading (length p).}
}
}
\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 \code{FUN} argument for \code{ComDim_y()} when \code{nort > 0}.
For \code{nort = 0} (plain PLS) a simpler PLS wrapper is sufficient.
}
\seealso{
\code{\link{ComDim_y}} for the multi-block OPLS wrapper that uses
  this function.
}
