clusterExt: Cluster-extend based thresholding method.

View source: R/clusterExt.R

clusterExtR Documentation

Cluster-extend based thresholding method.

Description

Given a NxV imaging matrix Y (N = number of subjects, V = number of vertices in the ventricular mesh), a NxC model matrix X (N = number of subjects, C = number of variables + intercept term) and the number of the column variables to extract, this function computes whether a vertex belongs to a significant cluster or not using a cluster-extend based thresholding method. The output is an array which stores as 1 the vertices that reached significance, 0 otherwise.

Usage

clusterExt(X, Y, extract, A, NNmatrix, nPermutations = 1000, HC4m = FALSE,
  parallel = FALSE, nCores = 1, thrFirst = 1)

Arguments

X

is the design matrix. Number of rows = number of subjects in the study, number of columns = number of vertices in the atlas. Numerical varable must be normalized to 0-mean and unit-standard deviation. Categorical variables must be coded using dummy coding. The first column should contain the intercept (all 1s).

Y

is the imaging matrix. Number of rows = N. Number of columns = V.

extract

is an array expressing which covariates in X you want to extract.

A

A V-dimensional vector containing the area associated with a vertex, usually its Voronoi area.

NNmatrix

Nx2 matrix containing the mesh edges. Important: to speed up the execution please avoid repetitions like (A,B) and (B,A).

nPermutations

number of permutations in the permutation test, default is 1000.

HC4m

flag for triggering HC4m correction, default is FALSE.

parallel

flag for triggering parallel computing, default is FALSE.

nCores

flag for defining the number of cores to use, default is 1.

firsThr

the cluster-forming threshold.

Value

The output of this function contains a list of the vertices that reached significace, 0 otherwise.

Examples

res = clusterExt(X, Y, extract, A, NNmatrix, nPermutations = 1000, HC4m = TRUE, nCores=1, thrFirst = 1)

UK-Digital-Heart-Project/mutools3D documentation built on April 7, 2024, 8:04 a.m.