pARIbrain: Permutation-based All-Resolutions Inference for brain...

View source: R/pARIbrain.R

pARIbrainR Documentation

Permutation-based All-Resolutions Inference for brain imaging.

Description

The main function for All-Resolutions Inference (ARI) method based on the critical vector constructed using the p-values permutation distribution. The function computes simultaneous lower bounds for the number of true discoveries for each set of hypotheses specified in ix controlling family-wise error rate at level alpha.

Usage

pARIbrain(copes, thr=NULL, mask=NULL, alpha=.05, clusters = NULL, 
alternative = "two.sided", summary_stat=c("max", "center-of-mass"),
silent=FALSE, family = "simes", delta = 0, B = 1000, rand = FALSE, 
iterative = FALSE, approx = TRUE, ncomb = 100, step.down = FALSE, max.step = 10, ...)

Arguments

copes

List of NIfTI file. The list of copes, i.e., contrasts maps, one for each subject used to compute the statistical tests.

thr

Numeric value. Threshold used to construct the cluster map. Default to NULL.

mask

NIfTI file or character string. 3D array of logical values (i.e. TRUE/FALSE in/out of the brain). Alternatively it may be a (character) NIfTI file name. If mask=NULL, it is assumed that none of the voxels have to be excluded.

alpha

Numeric value in '[0,1]'. \alpha level to control the family-wise error rate. Default to 0.05.

clusters

NIfTI file or character string. 3D array of cluster ids (0 when voxel does not belong to any cluster) or a (character) NIfTI file name. If cluster=NULL the cluster map is computed by the cluster_threshold function with threshold equals thr.

alternative

Character string. It refers to the alternative hypothesis, must be one of "two.sided" (default), "greater" or "lower".

summary_stat

Character string. Choose among =c("max", "center-of-mass").

silent

Boolean value. Default to FALSE. If TRUE the function prints the results.

family

String character. Name of the family confidence envelope to compute the critical vector from "simes", "aorc", "beta", "higher.criticism", and "power". Default to "simes".

delta

Numeric value. \delta value. Please see the reference below. Default to 0.

B

Numeric value. Number of permutations, default to 1000.

rand

Boolean value. Default to FALSE. If rand = TRUE, the p-values are computed by rowRanks. Please see signTest

iterative

Boolean value. If iterative = TRUE, the iterative method is applied (computationally demanding). Default to FALSE. Please see the reference below.

approx

Boolean value. Default to TRUE. If you are analyzing high dimensional data, we suggest to put approx = TRUE to speed up the computation time. Please see the reference below.

ncomb

Numeric value. If approx = TRUE, you must decide how many random sub collections (level of approximation) considered. Default to 100.

step.down

Boolean value. Default to FALSE If you want to compute the lambda calibration parameter using the step-down approach put TRUE. Please see the reference below.

max.step

Numeric value. Default to 10. Maximum number of steps for the step down approach, so useful when step.down = TRUE.

...

further arguments. See signTest.

Value

A list with elements:

out

Data.frame containing the size, the number of false null hypotheses, the number of true null hypotheses, the lower bound for the true discovery proportion, and other statistics for each cluster.

clusters

Matrix describing the clusters analyzed.

Author(s)

Angela Andreella

References

For the general framework of All-Resolutions Inference see:

Goeman, Jelle J., and Aldo Solari. "Multiple testing for exploratory research." Statistical Science 26.4 (2011): 584-597.

For All-Resolutions Inference for functional Magnetic Resonance Imaging data see:

Rosenblatt, Jonathan D., et al. "All-resolutions inference for brain imaging." Neuroimage 181 (2018): 786-796.

For permutation-based All-Resolutions Inference see:

Andreella, A., Hemerik, J., Finos, L., Weeda, W., & Goeman, J. (2023). Permutation-based true discovery proportions for functional magnetic resonance imaging cluster analysis. Statistics in Medicine, 42(14), 2311-2340.

See Also

signTest, lambdaOpt, criticalVector

Examples

## Not run: 
library(remotes)
install_github("angeella/fMRIdata")
library(fMRIdata)
data(Auditory_clusterTH3_2)
data(Auditory_copes)
data(Auditory_mask)
auditory_out <- pARIbrain(copes = Auditory_copes, 
clusters = Auditory_clusterTH3_2, mask = Auditory_mask, 
alpha = 0.05, silent = TRUE)
auditory_out$out

## End(Not run)

angeella/ARIpermutation documentation built on Sept. 12, 2024, 5:37 p.m.