tornado: Computes Correlation between Inputs and Output in a mc Object...

View source: R/tornado.R

tornadoR Documentation

Computes Correlation between Inputs and Output in a mc Object (tornado) in the Variability Dimension;

Description

Provides statistics for a tornado chart. Evaluates correlations between output and inputs of a ‘⁠mc⁠’ object.

Usage

tornado(mc, output=length(mc), use="all.obs", method=c("spearman",
	  "kendall", "pearson"), lim=c(0.025, 0.975))
## S3 method for class 'tornado'
print(x, ...)

Arguments

mc

a mc object or a mccut object.

x

A ‘⁠tornado⁠’ object as provided by the ‘⁠tornado⁠’ function.

output

(for ‘⁠mc⁠’ objects only). The rank or the name of the output to be considered. By default: the last element of the ‘⁠mc⁠’.

use

(for ‘⁠mc⁠’ objects only). 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).

method

(for ‘⁠mc⁠’ objects only). 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 : the default is not the same in cor.

lim

A vector of quantiles used to compute the credible interval in two-dimensional models.

...

Further arguments to be passed to the final print function.

Details

The tornado function computes the spearman's rho statistic. It is used to estimate a rank-based measure of association between one set of random variable of a ‘⁠mc⁠’ object (the output) and the others (the inputs).

⁠tornado⁠’ may be applied on a ‘⁠mccut⁠’ object if a ‘⁠tornado⁠’ function was used in the third block of the evalmccut call.

If "output" refers to a ‘⁠"0" mcnode⁠’, it is an error. If "output" refers to a ‘⁠"V" mcnode⁠’, correlations are only provided for other ‘⁠"V" mcnode⁠’s. If "output" refers to a ‘⁠"U" mcnode⁠’, correlations are only provided for other ‘⁠"U" mcnode⁠’s. If "output" refers to a ‘⁠"VU" mcnode⁠’, correlations are only provided for other ‘⁠"VU" mcnode⁠’s and ‘⁠"V" mcnode⁠’s.

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.

Value

An invisible object of class tornado. A tornado object is a list of objects containing the following objects:

value

the value of correlation coefficients

output

the name of the output

method

the method used

use

the use parameter

See Also

cor.

plot.tornado to draw the results.

Examples

data(total)
tornado(total, 2, "complete.obs", "spearman", c(0.025, 0.975))
tornado(total, 4, "pairwise.complete.obs", "spearman", c(0.025, 0.975))
tornado(total, 6, "complete.obs", "kendall", c(0.025, 0.975))
tornado(total, 8, "complete.obs", "spearman", c(0.025, 0.975))
(y <- tornado(total, 10, "complete.obs", "spearman", c(0.025, 0.975)))
plot(y)


mc2d documentation built on June 22, 2024, 10:54 a.m.