Learn R Programming

generalCorr (version 1.2.6)

gmcxy_np: Function to compute generalized correlation coefficients r*(x|y) and r*(y|x) from two vectors (not matrices)

Description

This function uses the `np' package and assumes that there are no missing data.

Usage

gmcxy_np(x, y)

Value

corxy

r*(x|y) from regressing x on y, where y is the kernel cause.

coryx

r*(y|x) from regressing y on x, where x is the cause.

Arguments

x

vector of x data

y

vector of y data

Author

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, 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.

Examples

Run this code
if (FALSE) {
set.seed(34);x=sample(1:10);y=sample(2:11)
gmcxy_np(x,y)}

Run the code above in your browser using DataLab