mgc.test {mgc} | R Documentation |
MGC Permutation Test
Description
Test of Dependence using MGC Approach.
Usage
mgc.test(
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,
nperm = 1000,
option = "mgc",
no_cores = 1
)
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
|
nperm |
specifies the number of replicates to use for the permutation test. Defaults to |
option |
is a string that specifies which global correlation to build up-on. Defaults to
|
no_cores |
the number of cores to use for the permutations. Defaults to |
Value
A list containing the following:
p.value |
P-value of MGC |
stat |
is the sample MGC statistic within |
p.localCorr |
P-value of the local correlations by double matrix index. |
localCorr |
the local correlations |
optimalScale |
the optimal scale identified by MGC |
option |
specifies which global correlation was used |
Details
A test of independence using the MGC approach, described in Vogelstein et al. (2019). For X \sim F_X
, Y \sim F_Y
:
H_0: F_X \neq F_Y
and:
H_A: F_X = F_Y
Note that one should avoid report positive discovery via minimizing individual p-values of local correlations, unless corrected for multiple hypotheses.
For details on usage see the help vignette:
vignette("mgc", package = "mgc")
Author(s)
Eric Bridgeford and C. Shen
References
Joshua T. Vogelstein, et al. "Discovering and deciphering relationships across disparate data modalities." eLife (2019).
Examples
## Not run:
library(mgc)
n = 100; d = 2
data <- mgc.sims.linear(n, d)
# note: on real data, one would put nperm much higher (at least 100)
# nperm is set to 10 merely for demonstration purposes
result <- mgc.test(data$X, data$Y, nperm=10)
## End(Not run)