whichCor: Returns the indexes of an upper triangular matrix with...

Description Usage Arguments Value Examples

View source: R/eval_stat.R

Description

Returns the indexes of an upper triangular matrix with logical entries.

Usage

1
whichCor(mat)

Arguments

mat

A matrix with logical entries in the upper triangular part

Value

Returns the indexes of the upper triangular part where the entries are TRUE

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
n <- 100
p <- 10
corr_theo <- diag(1,p)
corr_theo[1,3] <- 0.5
corr_theo[3,1] <- 0.5
data <- MASS::mvrnorm(n,rep(0,p),corr_theo)
res <- ApplyFwerCor(data,stat_test='empirical',method='Bonferroni',stepdown=FALSE)
# significant correlations, level alpha:
alpha <- 0.05
whichCor(res<alpha)

TestCor documentation built on Oct. 23, 2020, 5:31 p.m.