Learn R Programming

NNS (version 0.5.6)

NNS.dep.hd: NNS Co-Partial Moments Higher Dimension Dependence

Description

Determines higher dimension dependence coefficients based on degree 0 co-partial moments.

Usage

NNS.dep.hd(x, plot = FALSE, independence.overlay = FALSE)

Arguments

x

a numeric matrix or data frame.

plot

logical; FALSE (default) Generates a 3d scatter plot with regression points using plot3d.

independence.overlay

logical; FALSE (default) Creates and overlays independent Co.LPM and Co.UPM regions to visually reference the difference in dependence from the data.frame of variables being analyzed. Under independence, the light green and red shaded areas would be occupied by green and red data points respectively.

Value

  • $actual.observations Number of Co.LPM and Co.UPM observations.

  • $independent.null Expected number of Co.LPM and Co.UPM observations under the null hypothesis of independence.

  • $Dependence Multivariate nonlinear dependence coefficient [0,1]

References

Viole, F. (2016) "Beyond Correlation: Using the Elements of Variance for Conditional Means and Probabilities" https://www.ssrn.com/abstract=2745308.

Examples

Run this code
# NOT RUN {
set.seed(123)
x <- rnorm(1000) ; y <- rnorm(1000) ; z <- rnorm(1000)
A <- data.frame(x, y, z)
NNS.dep.hd(A, plot = TRUE, independence.overlay = TRUE)
# }

Run the code above in your browser using DataLab