File: mine_stat.Rd

package info (click to toggle)
r-cran-minerva 1.5.8-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 1,460 kB
  • sloc: ansic: 1,112; cpp: 271; sh: 14; makefile: 2
file content (59 lines) | stat: -rw-r--r-- 2,035 bytes parent folder | download
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
52
53
54
55
56
57
58
59
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{mine_stat}
\alias{mine_stat}
\title{This is an helper function to compute one \code{mine} statistic.
It take two vectors of the same dimension as an input.}
\usage{
mine_stat(x, y, alpha = 0.6, C = 15, est = "mic_approx",
  measure = "mic", eps = NA_real_, p = -1, norm = FALSE)
}
\arguments{
\item{x}{Numeric Vector of size \code{n}}

\item{y}{Numeric Vector of size \code{n}}

\item{alpha}{numeric value representing parameter for the mine statistic see \code{\link[minerva]{mine}}}

\item{C}{c parameter for the mine statistic see \code{\link[minerva]{mine}}}

\item{est}{character estimation parameter for the mine statistic.
Possible values are \code{"mic_approx"} or \code{"mic_e"}}

\item{measure}{integer indicating which measure to return
available measures are: \code{mic, mas, mev, mcn, tic, gmic}. The string could be also uppercase.
For measure \code{mic-r2} see details.}

\item{eps}{eps value for MCN statistic should be in (0,1). If NA (default) is passed then the normal MCN statistic is returned.}

\item{p}{probability for the generalized mic}

\item{norm}{boolean if require normalization between 0 and 1 for the \code{tic} statistic}
}
\description{
This is an helper function to compute one \code{mine} statistic.
It take two vectors of the same dimension as an input.
}
\details{
This is a wrapper function to compute the mine statistic between two variables.
for more details on the available measure and the meaning of the other parameters see also the 
documentation for the \code{\link[minerva]{mine}} function.

For measure \code{mic-r2} use the Pearson R coefficient score \code{\link[stats]{cor}} and the measure \code{mic}. 
See the example below.
}
\examples{
x <- runif(10); y <- 3*x+2;
mine_stat(x,y, measure="mic")

## Measure mic-r2
x <- matrix(rnorm(20), ncol=2, nrow=10)
mmic <- mine_stat(x[,1], x[,2], measure="mic")
r2 <- cor(x[,1], x[,2])

mmic - r2**2

}
\seealso{
\code{\link[minerva]{mine}}
}