whichCor {TestCor}R Documentation

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

Description

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

Usage

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

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)

[Package TestCor version 0.0.2.2 Index]