Getting Started with NNS: Correlation and Dependence"

knitr::opts_chunk$set(echo = TRUE)
require(NNS)
require(knitr)
require(rgl)

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.

x=seq(0,3,.01); y=2*x

cor(x,y)
NNS.dep(x,y,print.map = T,order=3)

Nonlinear Relationship

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

x=seq(0,3,.01); y=x^10

cor(x,y)
NNS.dep(x,y,print.map = T,order=3)

Dependence

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

set.seed(123)
df<- data.frame(x=runif(10000,-1,1),y=runif(10000,-1,1))
df<- subset(df, (x^2 + y^2 <= 1 & x^2 + y^2 >= 0.95))
NNS.dep(df$x,df$y,print.map = T)

References

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

*Nonlinear Nonparametric Statistics: Using Partial Moments

*Nonlinear Correlation and Dependence Using NNS

*Deriving Nonlinear Correlation Coefficients from Partial Moments

*Beyond Correlation: Using the Elements of Variance for Conditional Means and Probabilities



Try the NNS package in your browser

Any scripts or data that you put into this service are public.

NNS documentation built on Feb. 17, 2018, 1:03 a.m.