forked from neurodata/r-mgc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmgc.sample.Rd
More file actions
51 lines (47 loc) · 1.65 KB
/
mgc.sample.Rd
File metadata and controls
51 lines (47 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MGCSampleStat.R
\name{mgc.sample}
\alias{mgc.sample}
\title{MGC Sample}
\usage{
mgc.sample(A, B, option = "mgc")
}
\arguments{
\item{A}{is interpreted as:
\describe{
\item{a \code{[n x n]} distance matrix}{A is a square matrix with zeros on diagonal for \code{n} samples.}
\item{a \code{[n x d]} data matrix}{A is a data matrix with \code{n} samples in \code{d} dimensions.}
}}
\item{B}{is interpreted as:
\describe{
\item{a \code{[n x n]} distance matrix}{B is a square matrix with zeros on diagonal for \code{n} samples.}
\item{a \code{[n x d]} data matrix}{B is a data matrix with \code{n} samples in \code{d} dimensions.}
}}
\item{option}{is a string that specifies which global correlation to build up-on. Defaults to \code{'mgc'}.
\describe{
\item{\code{'mgc'}}{use the MGC global correlation.}
\item{\code{'dcor'}}{use the dcor global correlation.}
\item{\code{'mantel'}}{use the mantel global correlation.}
\item{\code{'rank'}}{use the rank global correlation.}
}}
}
\value{
A list containing the following:
\item{\code{statMGC}}{is the sample MGC statistic within \code{[-1,1]}}
\item{\code{localCorr}}{consists of all local correlations by double matrix index}
\item{\code{optimalScale}}{the estimated optimal scale in matrix single index.}
}
\description{
The main function that computes the MGC measure between two datasets:
It first computes all local correlations,
then use the maximal statistic among all local correlations based on thresholding.
}
\examples{
library(mgc)
n=200; d=2
data <- mgc.sims.linear(n, d)
lcor <- mgc.sample(data$X, data$Y)
}
\author{
C. Shen
}