View source: R/brainAnalysis.R
brainAnalysis | R Documentation |
This function uses permutation t-statistics/p-values to determine a true discovery guarantee for fMRI cluster analysis. It computes confidence bounds for the number of true discoveries and the true discovery proportion within each cluster. The bounds are simultaneous over all sets, and remain valid under post-hoc selection.
brainAnalysis(sumBrain, clusters = NULL, nMax = 50, silent = FALSE)
sumBrain |
an object of class sumBrain, as returned by the functions |
clusters |
3D numeric array of cluster indices, or character for a Nifti file name. If NULL, the whole brain is considered. |
nMax |
maximum number of iterations per cluster. |
silent |
logical, |
brainAnalysis
returns a list containing summary
(data frame) and
TDPmap
(3D numeric array of the true discovery proportions).
The data frame summary
contains, for each cluster,
size
: size
TD
: lower (1-alpha
)-confidence bound for the number of true discoveries
maxTD
: maximum value of TD
that could be found under convergence of the algorithm
TDP
: lower (1-alpha
)-confidence bound for the true discovery proportion
maxTD
: maximum value of TDP
that could be found under convergence of the algorithm
dim1
, dim2
, dim3
: coordinates of the center of mass.
Anna Vesely.
Goeman J. J. and Solari A. (2011). Multiple testing for exploratory research. Statistical Science, doi: 10.1214/11-STS356.
Vesely A., Finos L., and Goeman J. J. (2023). Permutation-based true discovery guarantee by sum tests. Journal of the Royal Statistical Society, Series B (Statistical Methodology), doi: 10.1093/jrsssb/qkad019.
Permutation statistics for brain imaging: brainScores
, brainPvals
Suprathreshold clusters: brainClusters
# 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 <- brainClusters(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 <- brainAnalysis(res, clusters = cl$clusters)
out$summary
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.