Provides statistics for a tornado chart. Evaluates correlations between output and inputs of a mc object in the uncertainty dimension.
# S3 method for mc
tornadounc(mc, output=length(mc), quant=c(0.5, 0.75, 0.975), use="all.obs",
method=c("spearman", "kendall", "pearson"), ...)
# S3 method for default
tornadounc(mc, ...)
# S3 method for tornadounc
print(x, ...)
# S3 method for mccut
tornadounc(mc, output=length(mc), quant=c(0.5, 0.75, 0.975), use="all.obs",
method=c("spearman", "kendall", "pearson"), ...)
An invisible object of class tornadounc. A tornadounc
object is a list of objects containing the following objects:
a matrix of values of correlation coefficients. Each row are the value or the statistics of inputs, each columns the value or the statistics of outputs.
the name of the output
the method used
the use parameter
a mc object.
a tornadounc object.
The rank or the name of the output to be considered. Should be a "VU" or a "U" type mcnode. By default: the last element of mc.
The vector of quantiles used in the variability dimension.
An optional character string giving a method for computing
covariances in the presence of missing values. This must be (an
abbreviation of) one of the strings "all.obs", "complete.obs" or
"pairwise.complete.obs" (see cor
).
A character string indicating which correlation
coefficient (or covariance) is to be computed. One of "spearman"
(default), "kendall" or "pearson", can be abbreviated (see
cor
). Warning : "pearson" is the default for
cor
).
Further arguments to be passed to the final print function.
The tornadounc.mc function computes the spearman's rho statistic between
values ("U" type mcnode) or statistics calculated in the variability dimension ("VU" type mcnode) of inputs and
values ("U" type mcnode) or statistics calculated in the variability dimension ("VU" type mcnode) of one output.
The statistics are the mean, the median and the quantiles specified by quant.
It is useful to estimate a rank-based measure of association between one set of random variable of a mc object (the output) and the others in the uncertainty dimension.
tornadounc.mccut may be applied on a mccut
object if a summary.mc function was used in the third block of
the evalmccut
call.
If output refers to a "0" or "V" mcnode, it is an error.
If use is "all.obs", then the presence of missing observations will produce an error. If use is "complete.obs" then missing values are handled by casewise deletion. Finally, if use has the value "pairwise.complete.obs" then the correlation between each pair of variables is computed using all complete pairs of observations on those variables.
data(total)
tornadounc(total, 3)
tornadounc(total, 4, use="complete")
tornadounc(total, 7, use="complete.obs")
tornadounc(total, 8, use="complete.obs")
(y <- tornadounc(total, 10, use="complete.obs"))
plot(y, 1, 1)
Run the code above in your browser using DataLab