Skip to content

Instantly share code, notes, and snippets.

View dmirman's full-sized avatar

Dan Mirman dmirman

View GitHub Profile
@dmirman
dmirman / cFWER.R
Created September 30, 2020 09:04
function for calculating continuous FWER correction for LSM (see http://dx.doi.org/10.1016/j.neuropsychologia.2017.08.025)
#Thresholding for VLSM using permutation based statistics
# ANTsR needs to be installed and loaded before the function can be run
#cFWER takes the following arguments
# lesmat - a matrix containing the lesion data from the patient scans
# behaveData - a vector containing only the behavioral data
# numPerm - a single integer argument that tells the function how many permutations to run
# voxThreshs - a vector containing the voxel numbers for thresholding
# flip - a bolean flag telling the function whether or not to flip the t values output from the