compute the matrix R* of generalized correlation coefficients.
compute the matrix R* of generalized correlation coefficients.
This function checks for missing data separately for each pair using 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 with the sign of the Pearson correlation coefficients. Its appeal is that it is asymmetric yielding causal direction information. It avoids the assumption of linearity implicit in the usual correlation coefficients.
gmcmtxZ(mym, nam = colnames(mym))
Arguments
mym: A matrix of data on variables in columns
nam: Column names of the variables in the data matrix
Returns
A non-symmetric R* matrix of generalized correlation coefficients
Note
This allows the user to change gmcmtx0 and further experiment with my code.
Examples
## Not run:set.seed(34);x=matrix(sample(1:600)[1:99],ncol=3)colnames(x)=c('V1','v2','V3')gmcmtxZ(x)## End(Not run)
References
Vinod, H. D. `Generalized Correlation and Kernel Causality with Applications in Development Economics' in Communications in Statistics -Simulation and Computation, 2015, tools:::Rd_expr_doi("10.1080/03610918.2015.1122048")
Author(s)
Prof. H. D. Vinod, Economics Dept., Fordham University, NY