NNS.dep: NNS Dependence

Description Usage Arguments Value Author(s) References Examples

View source: R/Dependence.R

Description

Returns the dependence and nonlinear correlation between two variables based on higher order partial moment matrices measured by frequency or area.

Usage

1
NNS.dep(x, y = NULL, order = NULL, degree = NULL, print.map = FALSE)

Arguments

x

a numeric vector, matrix or data frame.

y

NULL (default) or a numeric vector with compatible dimsensions to x.

order

integer; Controls the level of quadrant partitioning. Defaults to (order=NULL). Errors can generally be rectified by setting (order=1). Will not partition further if less than 4 observations exist in a quadrant.

degree

integer; Defaults to NULL to allow number of observations to be "degree" determinant.

print.map

logical; FALSE (default) Plots quadrant means.

Value

Returns the bi-variate "Correlation" and "Dependence" or correlation / dependence matrix for matrix input.

Author(s)

Fred Viole, OVVO Financial Systems

References

Viole, F. and Nawrocki, D. (2013) "Nonlinear Nonparametric Statistics: Using Partial Moments" http://amzn.com/1490523995

Examples

1
2
3
4
5
6
7
8
set.seed(123)
x<-rnorm(100); y<-rnorm(100)
NNS.dep(x,y)

## Correlation / Dependence Matrix
x<-rnorm(100); y<-rnorm(100); z<-rnorm(100)
B<-cbind(x,y,z)
NNS.dep(B)

NNS documentation built on Nov. 17, 2017, 5:19 a.m.