Creates a tornado-style plot from mcmodule_corr() results. For each input node,
the plot shows all variate-level correlations as small vertical ticks, a black
horizontal range line (min to max), a median marker, and a larger marker at the
maximum absolute correlation.
Arguments
- mcmodule
(mcmodule object, optional). Module used to compute correlations when
corr_resultsis NULL.- corr_results
(data frame, optional). Output table from
mcmodule_corr(). If provided, no new correlation analysis is run. Default: NULL.- output
(character, optional). Output node name. Passed to
mcmodule_corr()whencorr_resultsis NULL.- by_exp
(logical). Passed to
mcmodule_corr(). Default: FALSE.- match_variates
(logical). Passed to
mcmodule_corr(). Default: TRUE.- variates_as_nsv
(logical). Passed to
mcmodule_corr(). Default: FALSE.- print_summary
(logical). Passed to
mcmodule_corr(). Default: TRUE.- progress
(logical). Passed to
mcmodule_corr(). Default: FALSE.- method
(character). Passed to
mcmodule_corr(). Default:c("spearman", "kendall", "pearson").- use
(character). Passed to
mcmodule_corr(). Default: "all.obs".- lim
(numeric vector). Passed to
mcmodule_corr(). Default:c(0.025, 0.975).- colour
(character or logical). Colouring for max absolute points. Default: "strength". If
TRUEor "strength", points are coloured by qualitative correlation strength.
Details
mcmodule_tornado() returns a ggplot object. Use mcmodule_corr() when you
need the correlation table; use mcmodule_tornado() when you need a plot
object that can be further customised.
Interpretation: In the tornado plot each point (one per variate) shows the
correlation between that input and the chosen output across the model variates.
The coloured point highlights the variate with the maximum absolute correlation
for each input and is used to rank inputs. The black point is the median
correlation across variates and the black horizontal line shows the range
(minimum to maximum) of correlations for that input. The grey horizontal line
connects the maximum-absolute point to the zero-correlation vertical line to
facilitate interpretation. Use mcmodule_corr() to inspect the numeric
per-variate correlations, the plot is designed to give a compact visual
summary.
