Skip to content
Switch branches/tags
Go to file

Latest commit


Git stats


Failed to load latest commit information.


This folder contains code supporting the spatiotemporal mixed model. This code was written for Matlab 2015a and may not run on earlier versions. It is recommended that the user start with "ExampleSimulations.m", which simulates data for a parcel from the Gordon parcellation (Gordon, E. M., Laumann, T. O., Adeyemo, B., Huckins, J. F., Kelley, W. M., & Petersen, S. E. (2016). Generation and evaluation of a cortical area parcellation from resting-state correlations. Cerebral cortex, 26(1), 288-303.) Note the design matrices are constructed from data from the HCP theory of mind experiment and are redistributed under the data use terms, see

Code implementing the analysis for the HCP data is provided, including functions to extract cortical surface data from cifti files for input to matlab. Some degree of adaptation is required for use, and indicated in the "Begin user input--->" to "<------End user input" that appears at the beginning of each .m file.

Estimation is divided into four programs: 1) create subject design matrices; 2) extract cortical surface data from the HCP cifti files; 3) conduct first-level analysis using reduced bias AR parameters, conduct cross validation, and smooth temporal variance parameters; 4) fit the mixed model to the dhat and smoothed temporal variance parameters.

Questions or report bugs: Benjamin Risk,


Matlab functions supporting ``Spatiotemporal mixed modeling of multi-subject task fMRI via method of moments''




No releases published


No packages published