findClusters: Suprathreshold Clusters for Brain Imaging

Description Usage Arguments Value Author(s) See Also Examples

View source: R/findClusters.R

Description

This function determines spatially connected clusters, where t-scores are more extreme than a given threshold.

Usage

1
findClusters(copes, mask = NULL, thr = 3.2, alternative = "two.sided", silent = FALSE)

Arguments

copes

list of 3D numeric arrays (contrasts maps for each subject).

mask

3D logical array, where TRUE values correspond to voxels inside the brain, or character for a Nifti file name.

thr

threshold.

alternative

direction of the alternative hypothesis (greater, lower, two.sided).

silent

logical, FALSE to print the number of clusters.

Value

findClusters returns a 3D numeric array, with integer values corresponding to clusters, and 0 to other voxels.

Author(s)

Anna Vesely.

See Also

Permutation statistics for brain imaging: brainScores, brainPvals

True discovery guarantee for cluster analysis: clusterAnalysis

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# simulate 20 copes with dimensions 10x10x10
set.seed(42)
copes <- list()
for(i in seq(20)){copes[[i]] <- array(rnorm(10^3, mean = -10, sd = 30), dim=c(10,10,10))}

# cluster map where t scores are grater than 2.8, in absolute value
thr <- 2.8
cl <- findClusters(copes = copes, thr = thr)

# create object of class sumBrain
res <- brainScores(copes = copes, alpha = 0.2, seed = 42, truncFrom = thr)
res
summary(res)

# confidence bound for the number of true discoveries and the TDP within clusters
out <- clusterAnalysis(res, clusters = cl$clusters)

sumSome documentation built on Nov. 24, 2021, 9:06 a.m.