plot_pls_vip | R Documentation |
Plot stacked ggplot2 graphs of VIP for the final PLS regression model output of the calibration (training) data set for the final number of components, raw (replicate mean) spectra, and preprocessed spectra. Regions with VIP > 1 are highlighted across the stacked graphs in beige colour rectangles. VIP calculation is implemented as described in Chong, I.-G., and Jun, C.-H. (2005). Performance of some variable selection methods when multicollinearity is present. Chemometrics and Intelligent Laboratory Systems, 78(1–2), 103–112. https://doi.org/10.1016/j.chemolab.2004.12.011
plot_pls_vip(mout, y1 = "spc_mean", y2 = "spc_pre",
by = "sample_id",
xlab = expression(paste("Wavenumber [", cm^-1, "]")),
ylab1 = "Absorbance", ylab2 = "Preprocessed Abs.",
alpha = 0.2)
mout |
Model output list that is returned from
|
y1 |
Character vector of list-column name in
|
y2 |
Character string of list-column name in
|
by |
Character string that is used to assign spectra to the same group
and therefore ensures that all spectra are plotted with the same colour.
Default is |
xlab |
Character string of X axis title for shared x axis of stacked
graphs. Default is |
ylab1 |
Y axis title of bottom spectrum. Default is |
ylab2 |
Y axis title of bottom spectrum. Default is
|
alpha |
Double between 0 and 1 that defines transparency of spectra lines in returned graph (ggplot plot object). |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.