AUK: Draw Kendall plot and compute AUK.

Description Usage Arguments Details Value Author(s) References Examples

View source: R/KPlot.R

Description

This function draws Kendall plot of 2 variables. Also provides an index AUK (area under Kendall plot).

Usage

1
2
AUK(x, y, plot = F, main = "Kendall plot", Auxiliary.line = T,
  BS.CI = 0, set.seed = FALSE)

Arguments

x

a numeric vector stores first variable.

y

a numeric vector stores second variable.

plot

a TRUE/ FALSE flag for generating Kendall plot or not.

main

a character indicating the title of the plot.

Auxiliary.line

a TRUE/ FALSE flag for drawing auxiliary lines or not.

BS.CI

a numeric specifying alpha for Bootstrap confidence interval. When euqal 0, confidence interval won't be computed.

set.seed

a TRUE/ FALSE flag specifying setting seed or not.

Details

AUK is bounded between 0 and 0.75. For positively correlated x and y's, say x = y, AUK = 0.75. And the plot follows the concave auxiliary line. While negatively correlated x and y's, AUK = 0. The plot is horizontal on y = 0. For independent x and y, AUK = 0.5. Kendall plot is on the diagonal. Due to possible variable overflow, this function is only suitable for input size less than 1000. Input size greater than 1000 causes error.

Value

a list containing a numeric AUK, a numeric vector W.in (x axis of plot), a numeric vector Hi.sort (y axis of plot), and three confidence intervals: normal CI, pivotal CI and percentage CI.

Author(s)

Jeffrey C. Miecznikowski, En-shuo Hsu, Yanhua Chen, Albert Vexler

References

Vexler, Albert, Xiwei Chen, and Alan D. Hutson. "Dependence and independence: Structure and inference." Statistical methods in medical research (2015): 0962280215594198.

R package "VineCopula": Schepsmeier, Ulf, et al. "Package 'VineCopula'." (2015).

Examples

1
2
3
4
5
6
7
8
set.seed(123)
x = runif(100)
y = runif(100)

result = AUK(x, y, plot = TRUE)
result$AUK

#[1] 0.4987523

Example output

Loading required package: parallel
Loading required package: minerva
Loading required package: Hmisc
Loading required package: lattice
Loading required package: survival
Loading required package: Formula
Loading required package: ggplot2

Attaching package: 'Hmisc'

The following objects are masked from 'package:base':

    format.pval, round.POSIXt, trunc.POSIXt, units

[1] 0.4987523

testforDEP documentation built on May 2, 2019, 6:46 a.m.

Related to AUK in testforDEP...