gmcmtx0: Matrix R* of generalized correlation coefficients captures...

View source: R/gmcmtx0.R

gmcmtx0R Documentation

Matrix R* of generalized correlation coefficients captures nonlinearities.


This function checks for missing data for each pair individually. It then uses the kern function to kernel regress x on y, and conversely y on x. It needs the R package ‘np’ which reports R-squares of each regression. This function reports their square roots after assigning them the observed sign of the Pearson correlation coefficient. Its advantages are: (i) It is asymmetric yielding causal direction information by relaxing the assumption of linearity implicit in usual correlation coefficients. (ii) The r* correlation coefficients are generally larger upon admitting arbitrary nonlinearities. (iii) max(|R*ij|, |R*ji|) measures (nonlinear) dependence. For example, let x=1:20 and y=sin(x). This y has a perfect (100 percent) nonlinear dependence on x and yet Pearson correlation coefficient r(xy) -0.0948372 is near zero and usual confidence interval (-0.516, 0.363) includes zero, implying that it is not different from zero. This shows a miserable failure of traditional r(x,y) to measure dependence when nonlinearities are present. gmcmtx0(x,y) will correctly reveal perfect (nonlinear) dependence with generalized correlation coefficient =1.


gmcmtx0(mym, nam = colnames(mym))



A matrix of data on variables in columns


Column names of the variables in the data matrix


A non-symmetric R* matrix of generalized correlation coefficients


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


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. 'New exogeneity tests and causal paths,' Chapter 2 in 'Handbook of Statistics: Conceptual Econometrics Using R', Vol.32, co-editors: H. D. Vinod and C.R. Rao. New York: North Holland, Elsevier Science Publishers, 2019, pp. 33-64.

Zheng, S., Shi, N.-Z., and Zhang, Z. (2012). 'Generalized measures of correlation for asymmetry, nonlinearity, and beyond,' Journal of the American Statistical Association, vol. 107, pp. 1239-1252.

See Also

See Also as gmcmtxBlk for a more general version using blocking allowing several bandwidths.



## Not run: 
colnames(x)=c('V1', 'v2', 'V3')
## End(Not run)

generalCorr documentation built on May 1, 2023, 9:06 a.m.