Plot variable importance
Arguments
- importance
[numeric]
Numeric vector showing the importance score of each variable, resulting fromvariable_importance()
.- remove_threshold
[numeric(1)=0]
Only importance scores above this level will be plotted. Default is 0, in case which all null variables will be removed. To plot all variables, set remove_threshold as -1 or any other negative value.- normalize
[logical(1)=TRUE]
IfTRUE
, the variable importance scores are dividing the the maximum score, so that the score of the most important variable is set to 1.- plot_type
[character="barplot"]{"barplot", "boxplot"}
Whether the plot should be a barplot (default) or a boxplot. The boxplot is only meaningful ifsumm_stat != FALSE
(median or mean) and if the importance is computed for blocks (by = "blockH0"
).- summ_stat
[string(1)=FALSE]
Name of a summary statistic to be computed across blocks H0 (areas, herd, populations) for each variable. This is valid only when variable importance was computed bor each block H0, with the parametercolH0
provided (i.e., notNULL
) within the functionvariable_importance()
. Default isFALSE
, in case which variable importance is plotted for each block H0. The only summary stat implemented is"mean"
and"median"
(the variable importance plotted is the average/median across blocks), but others might be implemented.- by
[character=FALSE]{FALSE, "blockH0", "variable"}
Ifby = FALSE
(default), a single plot is made. Ifby = "blockH0"
, the variable importance if plotted for each block H0 (e.g. population, area) ifplot_type = "barplot"
(with the variables as a category in each plot), and as a single boxplot plot ifplot_type = "boxplot"
. Ifby = "variable"
, the plot is made separately for each variable, with blocks H0 as a category in each plot.- scales
[character="fixed"]{"fixed", "free_x", "free_y", "free}
Scale/range of the axes when facets are used in the plots, whenby
is notFALSE
. See the parameterscales
inggplot2::facet_wrap()
for more information.