gmcmtxZ: compute the matrix R* of generalized correlation...

View source: R/gmcmtxZ.R

gmcmtxZR Documentation

compute the matrix R* of generalized correlation coefficients.

Description

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.

Usage

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

Value

A non-symmetric R* matrix of generalized correlation coefficients

Note

This allows the user to change gmcmtx0 and further experiment with my code.

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")}

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)


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