Learn R Programming

minerva (version 1.5.10)

mine_stat: This is an helper function to compute one mine statistic. It take two vectors of the same dimension as an input.

Description

This is an helper function to compute one 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

x

Numeric Vector of size n

y

Numeric Vector of size n

alpha

numeric value representing parameter for the mine statistic see mine

C

c parameter for the mine statistic see mine

est

character estimation parameter for the mine statistic. Possible values are "mic_approx" or "mic_e"

measure

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

eps

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

p

probability for the generalized mic

norm

boolean if require normalization between 0 and 1 for the tic statistic

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 mine function.

For measure mic-r2 use the Pearson R coefficient score cor and the measure mic. See the example below.

See Also

mine

Examples

Run this code
# NOT RUN {
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

# }

Run the code above in your browser using DataLab