barplot_var_stability {nestedcv} | R Documentation |
Barplot variable stability
Description
Produces a ggplot2 plot of stability (as SEM) of variable importance across models trained and tested across outer CV folds. Optionally overlays directionality for binary response or regression outcomes.
Usage
barplot_var_stability(
x,
final = TRUE,
top = NULL,
direction = 0,
dir_labels = NULL,
scheme = c("royalblue", "red"),
breaks = NULL,
percent = TRUE,
level = 1,
sort = TRUE
)
Arguments
x |
a |
final |
Logical whether to restrict variables to only those which ended up in the final fitted model or to include all variables selected across all outer folds. |
top |
Limits number of variables plotted. Set to |
direction |
Integer controlling plotting of directionality for binary or
regression models. |
dir_labels |
Character vector for controlling the legend when
|
scheme |
Vector of 2 colours for directionality when |
breaks |
Vector of continuous breaks for legend colour/size |
percent |
Logical for |
level |
For multinomial |
sort |
Logical whether to sort by mean variable importance. Passed to
|
Value
A ggplot2 plot