vipscores: VIP scores for PLS model

View source: R/pls.R

vipscoresR Documentation

VIP scores for PLS model

Description

Calculates VIP (Variable Importance in Projection) scores for predictors either individual for each response variable or total for the entire model with given number of components.

Usage

vipscores(obj, ncomp = obj$ncomp.selected, type = "individual")

Arguments

obj

a PLS model (object of class pls)

ncomp

number of components to use in the model for calculation.

type

type of VIP scores: "individual" computes separate VIP scores for each response variable (returns nvar x nresp matrix), "combined" computes a single VIP vector by summing explained Y-variance across all responses before normalizing as described in [1] (returns nvar x 1 matrix). For PLS1 models both types give identical results.

Details

The "individual" type computes VIP scores separately for each response variable, weighting by the Y-variance explained per response. The "combined" type follows the original formula from [1], which sums explained Y-variance across all responses to produce a single VIP value per predictor. For PLS1 models (single response), both types are equivalent.

If you want to make a plot use for example: mdaplot(mda.t(v), type = "l"), where v is a vector with computed VIP scores. Or just try plotVIPScores.pls.

Value

matrix with VIP score values. If type = "individual", dimensions are nvar x nresp (columns correspond to responses). If type = "combined", dimensions are nvar x 1.

References

[1] Il-Gyo Chong, Chi-Hyuck Jun. Chemometrics and Laboratory Systems, 78 (2005), pp. 103-112.


mdatools documentation built on March 6, 2026, 5:08 p.m.