TFCE.vertex_analysis.mixed {VertexWiseR}R Documentation

Vertex-wise analysis with TFCE (mixed effect)

Description

Fits a linear mixed effects model with the cortical or hippocampal surface data as the predicted outcome, and returns t-stat and TFCE statistical maps for the selected contrast.

Usage

TFCE.vertex_analysis.mixed(
  model,
  contrast,
  surf_data,
  random,
  nperm = 100,
  tail = 2,
  nthread = 10,
  smooth_FWHM,
  perm_type = "row",
  VWR_check = TRUE
)

Arguments

model

An N X V data.frame object containing N rows for each subject and V columns for each predictor included in the model.This data.frame should not include the random effects variable.

contrast

A numeric vector or object containing the values of the predictor of interest. The t-stat and TFCE maps will be estimated only for this predictor

surf_data

A matrix object containing the surface data, see SURFvextract() or HIPvextract() output format.

random

An object or vector containing the values of the random variable

nperm

A numeric integer object specifying the number of permutations generated for the subsequent thresholding procedures (default = 100)

tail

A numeric integer object specifying whether to test a one-sided positive (1), one-sided negative (-1) or two-sided (2) hypothesis

nthread

A numeric integer object specifying the number of CPU threads to allocate

smooth_FWHM

A numeric vector object specifying the desired smoothing width in mm

perm_type

A string object specifying whether to permute the rows ("row"), between subjects ("between"), within subjects ("within") or between and within subjects ("within_between") for random subject effects. Default is "row".

VWR_check

A boolean object specifying whether to check and validate system requirements. Default is TRUE.

Details

This TFCE method is adapted from the 'Nilearn' Python library.

Value

A list object containing the t-stat and the TFCE statistical maps which can then be subsequently thresholded using TFCE.threshold()

Examples

demodata = readRDS(system.file('demo_data/SPRENG_behdata_site1.rds', package = 'VertexWiseR'))[1:5,]
surf_data = readRDS(file = url(paste0("https://github.com",
"/CogBrainHealthLab/VertexWiseR/blob/main/inst/demo_data/",
"SPRENG_CTv_site1.rds?raw=TRUE")))[1:5,]

TFCE.pos=TFCE.vertex_analysis.mixed(model=demodata[,c(2,7)],
contrast=demodata[,7], surf_data,random=demodata[,1], 
nperm =5,tail = 1, nthread = 2, VWR_check=FALSE)

#To get significant clusters, you may then run:
#results=TFCE.threshold(TFCE.pos, p=0.05, atlas=1)
#results$cluster_level_results


[Package VertexWiseR version 1.0.0 Index]