powered by
Variable importance in projection (VIP) scores
pls_vip(object, comps = NULL)
A named numeric vector of VIP scores.
A fitted PLS model.
Components used to compute the VIP scores. Defaults to all available components.
set.seed(123) X <- matrix(rnorm(40), nrow = 10) y <- X[, 1] - 0.5 * X[, 2] + rnorm(10, sd = 0.1) fit <- pls_fit(X, y, ncomp = 2, scores = "r") pls_vip(fit)
Run the code above in your browser using DataLab