Last data update: 2014.03.03

R: Compute the matrix R* of generalized correlation...
gmcmtx0R Documentation

Compute the matrix R* of generalized correlation coefficients.

Description

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 library ‘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 genearally larger upon admitting arbitrary nonlinearities.

Usage

gmcmtx0(mym, nam = colnames(mym))

Arguments

mym

A matrix of data on variables in columns

nam

Column names of the variables in the data matrix

Value

A non-symmetric R* matrix of generalized correlation coefficients

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, http://dx.doi.org/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.

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.

Examples


gmcmtx0(mtcars[,1:3])

## Not run: 
set.seed(34);x=matrix(sample(1:600)[1:99],ncol=3)
colnames(x)=c('V1', 'v2', 'V3')
gmcmtx0(x)
## End(Not run)

Results