% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/stats_vip.R
\name{.vip}
\alias{.vip}
\title{Compute Variable Importance in Projection (VIP)}
\usage{
.vip(Tx, W, C)
}
\arguments{
\item{Tx}{Numeric matrix (n x A). Score matrix.}

\item{W}{Numeric matrix (A x p). Weight matrix.
Rows correspond to components, columns to variables.}

\item{C}{Numeric vector or matrix of length A. Y-loadings.}
}
\value{
Numeric vector of length p containing VIP scores.
}
\description{
Calculates VIP scores for a PLS/OPLS model using predictive
components only.
}
\details{
VIP is computed as:

\deqn{
VIP_j = \sqrt{ p \frac{\sum_a SSY_a w_{aj}^2}{\sum_a SSY_a} }
}

where
SSY_a = (t_a^T t_a) * c_a^2

By construction, mean(VIP^2) = 1.
}
\keyword{internal}
