Calculate Variable Importance in Projection from regression model.
- vip_scores = vip(model)
- vip_scores = vip(xscrs,xlds,wts,reg)
Variable Importance in Projection (VIP) scores estimate the importance of each variable in the projection used in a PLS model and is often used for variable selection. A variable with a VIP Score close to or greater than 1 (one) can be considered important in given model. Variables with VIP scores significantly less than 1 (one) are less important and might be good candidates for exclusion from the model.
It should be noted that the nature of the VIP calculation is such that when the model is rebuilt, new variables will always be below the threshold so this approach does not lend itself to repeated variable exclusion.
The input is a PLS model structure (model) or the outputs from SIMPLS or NIPPLS. The output (vip_scores) is a set of column vectors equal in length to the number of variables included in the model. It contains one column of VIP scores for each column of the original calibration y-block. In the case of multiple columns the values on each row should be compared logically "if any is >1", or use a "max" operation, to decide which rows (original variables) are important.
See Chong & Jun, Chemo. Intell. Lab. Sys. 78 (2005) 103-112.
Standard input is:
- model = PLS model structure from a PLS model,
Alternative input format is the outputs of the SIMPLS or NIPPLS:
- xscrs = X-block scores,
- xlds = X-block loadings,
- wts = X-block weights,
- reg = regression vectors for each column of y and each number of latent variables (reg).
- vip_scores = a set of column vectors equal in length to the number of variables included in the model. It contains one column of VIP scores for each predicted y-block column.
selectvars, genalg, ipls, plotloads, pls, plsda, sratio, rpls, Sample and Variable Selection, Variable Selection