depMeas: depMeas Signed measure of nonlinear nonparametric dependence...

View source: R/depMeas.R

depMeasR Documentation

depMeas Signed measure of nonlinear nonparametric dependence between two vectors.

Description

An infant may depend on the mother for survival, but not vice versa. Dependence relations need not be symmetric, yet correlation coefficients are symmetric. One way to measure the extent of dependence is to find the max of the absolute values of the two asymmetric correlations using Vinod's (2015) definition of generalized (asymmetric) correlation coefficients. It requires a kernel regression of x on y obtained by using the ‘np’ package and its flipped version (regress y on x). We use a block version of ‘gmcmtx0’ called 'gmcmtxBlk' to admit several bandwidths for every ten observations if the user sets blksiz=10, a recommended choice here.

Usage

depMeas(x, y, blksiz = length(x))

Arguments

x

Vector of data on the first variable

y

Vector of data on the second variable

blksiz

block size, default blksiz =n, where n=rows in the matrix or no blocking is done

Value

A measure of dependence having the same sign as Pearson correlation. Its magnitude equals the larger of the two generalized correlation coefficients.

Note

This function needs the gmcmtxBlk function, which in turn needs the np package.

Author(s)

Prof. H. D. Vinod, Economics Dept., Fordham University, NY

References

Vinod, H. D. 'Generalized Correlation and Kernel Causality with Applications in Development Economics' in Communications in Statistics -Simulation and Computation, 2015, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1080/03610918.2015.1122048")}

Vinod, H. D. 'Matrix Algebra Topics in Statistics and Economics Using R', Chapter 4 in Handbook of Statistics: Computational Statistics with R, Vol.32, co-editors: M. B. Rao and C.R. Rao. New York: North Holland, Elsevier Science Publishers, 2014, pp. 143-176.

Vinod, H. D. (2021) 'Generalized, Partial and Canonical Correlation Coefficients' Computational Economics, 59(1), 1–28.

See Also

See Also gmcmtx0 and gmcmtxBlk

Examples

library(generalCorr)
options(np.messages = FALSE)
x=1:20;y=sin(x)
depMeas(x,y,blksiz=20)


generalCorr documentation built on Oct. 10, 2023, 1:06 a.m.