rstar | R Documentation |
Uses Vinod (2015) definition of generalized (asymmetric) correlation coefficients. It requires kernel regression of x on y obtained by using the ‘np’ package. It also reports usual Pearson correlation coefficient r and p-value for testing the null hypothesis that (population r)=0.
rstar(x, y)
x |
Vector of data on the dependent variable |
y |
Vector of data on the regressor |
Four objects created by this function are:
corxy |
r*x|y or regressing x on y |
coryx |
r*y|x or regressing y on x |
pearson.r |
Pearson's product moment correlation coefficient |
pv |
The p-value for testing the Pearson r |
This function needs the kern function which in turn needs the np package.
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.
See Also gmcmtx0
and gmcmtxBlk
.
x=sample(1:30);y=sample(1:30); rstar(x,y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.