Getting Started with NNS: Correlation and Dependence

Fred Viole

require(NNS)
require(knitr)
require(rgl)
require(data.table)

Correlation and Dependence

The limitations of linear correlation are well known. Often one uses correlation, when dependence is the intended measure for defining the relationship between variables. NNS dependence NNS.dep is a signal:noise measure robust to nonlinear signals.

Below are some examples comparing NNS correlation NNS.cor and NNS.dep with the standard Pearson’s correlation coefficient cor.

Linear Equivalence

Note the fact that all observations occupy the co-partial moment quadrants.

## [1] 1

## $Correlation
## [1] 1
## 
## $Dependence
## [1] 1

Nonlinear Relationship

Note the fact that all observations occupy the co-partial moment quadrants.

## [1] 0.6610183

## $Correlation
## [1] 0.9142701
## 
## $Dependence
## [1] 0.9142701

Dependence

Note the fact that all observations occupy only co- or divergent partial moment quadrants for a given subquadrant.

## $Correlation
## [1] -0.001657492
## 
## $Dependence
## [1] 0.9104624

Multi-Dimensional Dependence

These partial moment insights permit us to extend the analysis to multivariate instances. This level of analysis is simply impossible with Pearson or other rank based correlation methods, which are restricted to pairwise cases.

set.seed(123)
x=rnorm(1000);y=rnorm(1000);z=rnorm(1000)
NNS.dep.hd(cbind(x,y,z),plot=TRUE,independence.overlay=TRUE)
## $actual.observations
## [1] 267
## 
## $independent.null
## [1] 250
## 
## $Dependence
## [1] 0.02266667

References

If the user is so motivated, detailed arguments and proofs are provided within the following: