mgc.localcorr {mgc} | R Documentation |
MGC Local Correlations
Description
Compute all local correlation coefficients in O(n^2 log n)
Usage
mgc.localcorr(
X,
Y,
is.dist.X = FALSE,
dist.xfm.X = mgc.distance,
dist.params.X = list(method = "euclidean"),
dist.return.X = NULL,
is.dist.Y = FALSE,
dist.xfm.Y = mgc.distance,
dist.params.Y = list(method = "euclidean"),
dist.return.Y = NULL,
option = "mgc"
)
Arguments
X |
is interpreted as:
|
Y |
is interpreted as:
|
is.dist.X |
a boolean indicating whether your |
dist.xfm.X |
if |
dist.params.X |
a list of trailing arguments to pass to the distance function specified in |
dist.return.X |
the return argument for the specified
|
is.dist.Y |
a boolean indicating whether your |
dist.xfm.Y |
if |
dist.params.Y |
a list of trailing arguments to pass to the distance function specified in |
dist.return.Y |
the return argument for the specified
|
option |
is a string that specifies which global correlation to build up-on. Defaults to
|
Value
A list contains the following:
corr |
consists of all local correlations within [-1,1] by double matrix index |
varX |
contains all local variances for X. |
varY |
contains all local variances for X. |
Author(s)
C. Shen
Examples
library(mgc)
n=200; d=2
data <- mgc.sims.linear(n, d)
lcor <- mgc.localcorr(data$X, data$Y)