powered by
Plot variable loadings
plot_pls_variables( object, comps = c(1L, 2L), circle = TRUE, circle_col = "grey80", arrow_col = "steelblue", arrow_scale = 1, ... )
Invisibly returns NULL after drawing the plot.
NULL
A fitted PLS model.
Components to display (length two).
Logical; draw the unit circle.
Colour of the unit circle.
Colour of the variable arrows.
Scaling applied to variable vectors.
Additional plotting parameters passed to graphics::plot().
graphics::plot()
set.seed(123) X <- matrix(rnorm(60), nrow = 20) y <- X[, 1] - 0.5 * X[, 2] + rnorm(20, sd = 0.1) fit <- pls_fit(X, y, ncomp = 2, scores = "r") plot_pls_variables(fit)
Run the code above in your browser using DataLab