Matlab Errors: License Manager and mexmaci64

Working from home during a pandemic can be exhausting: Choosing what not to wear, what not to pack for lunch; one day, I hope, our descendants will look back at us and appreciate the sacrifices we made. Sure, our great-grandfathers stormed the beaches of Normandy and fought the Kaiser and all that, but they never had to deal with digital eyestrain from back-to-back Zoom meetings - sometimes more than three or four in a row. I’m not asking for a parade here; we were just doing our job.

But if that wasn’t bad enough, some of us also have problems with Matlab connecting to its license server. For those working remotely, you may have come across this particular error message when opening up Matlab:

Read more

Website Updates

Although most of my time has been spent on the e-book, recently I have made a few updates to this website as well. The Research section has been removed, since that is no longer the focus of my work; a couple of new Workshops have been added; and the Publications and CV pages have been updated.

For those looking for new training walkthroughs, the Videos gallery now contains four new playlists:

  1. Standardized Preprocessing with fMRIPrep;

  2. Diffusion Analysis with MRtrix;

  3. Connectivity Analysis with the CONN Toolbox; and

  4. fMRI Analysis with SPM.

Read more

ROI Analysis Presentation

Overview

This post is a supplement to the ROI workshop at NYU. You can follow along with the lecture on YouTube here, and you can download the example dataset here.

Code Templates

The following code templates will be used for the workshop. You can change them to reflect the conditions and design of your own study. Also note that these code snippets can be rewritten to be used with loops.

  1. Creating an ROI: echo “42 -13 58” | 3dUndump -srad 5 -orient LPI -master subj001_stats.nii -prefix Right_M1.nii -xyz -
  2. Concatenating Contrast Maps: 3dTcat subj001_stats.nii'[3]' subj002_stats.nii'[3]', subj003_stats.nii'[3]' subj004_stats.nii'[3]' subj005_stats.nii'[3]' subj006_stats.nii'[3]' -prefix Left-Right_ContrastMaps.nii
  3. Extracting Data from an ROI: 3dROIstats -quiet -mask Right_M1.nii Left-Right_ContrastMaps.nii

Exercises for Unpacking Contrasts and Double Dissociations

  1. To unpack the contrast estimate of Left-Right button presses, we will need to extract the Left and Right contrast maps. These correspond to the volumes (or "sub-briks") 0 and 1 in each subject's dataset. In the 3dTcat code template above, replace the 3 with a 0 in order to concatenate the Left parameter estimates together, and change the output label after the -prefix option to reflect the new output dataset (e.g., Left.nii). Do the same procedure for the Right parameter estimates.
  2. Modify the 3dROIstats code template to extract the parameter estimates for Left and Right button presses from the Right_M1.nii mask.
  3. Create another ROI in the left motor cortex by flipping the sign of the X-coordinate in the 3dUndump code template (i.e., echo "-42 -13 58"). Change the prefix to Left_M1.nii. Then modify the 3dTcat and 3dROIstats code templates to extract Left and Right parameter estimates from the Left_M1 mask. Use your preferred statistical software package to test for significant differences between the parameters within each ROI, and test for an ROI x Condition interaction.

Additional Reading

Circular ROI Analysis: See the original Vul et al. 2009 paper, and the Kriegeskorte et al. 2009 paper.
Leave-One-Out-Cross-Validation (LOOCV): Esterman et al., 2010
How to use Neurosynth: See this webpage