Google Drive for Desktop across multiple mac users? No.

My lab uses a Mac Pro with 512GB RAM for most of our computationally intensive analyses. It’s been a great resource, giving us local control and immediate access to high-performance computing, while providing a familiar environment (Mac OS) where we can also test software that will be run by many Mac users. We also use … Continue reading Google Drive for Desktop across multiple mac users? No.

How to perform CompCor on HCP fMRI data in R

This is a guest post written by Damon Pham. Damon is a recent graduate from Indiana University, where he was a Wells Scholar (the highest honor for incoming IU students) and all around extraordinaire. He has been part of my research group for the last several years, where one of his main focuses has been … Continue reading How to perform CompCor on HCP fMRI data in R

The Role of Centering in Dual Regression

Dual regression is maybe the simplest way to obtain subject-specific estimates of ICA-based resting-state networks (RSNs).  RSNs are regions of the brain that tend to act in a coordinated manner in the absence of a specific task, such as the three shown below (from a 50-component ICA of the Human Connectome Project).  Popular ICA toolboxes for … Continue reading The Role of Centering in Dual Regression

How to efficiently prewhiten fMRI timeseries the “right” way

I recently got around to reading the high-profile PNAS paper titled “Cluster failure: Why fMRI inferences for spatial extent have inflated false-positive rates” (Eklund et al. 2016), which called attention to the importance of properly processing and analyzing fMRI data. This lead me to an earlier paper titled “Does parametric fMRI analysis with SPM yield valid … Continue reading How to efficiently prewhiten fMRI timeseries the “right” way

R function to write CIFTI files

Update: This post is outdated.  Use our ciftiTools R package instead!  ciftiTools is available to install from CRAN in R: install.packages(“ciftiTools”) or from GitHub for the latest release: library(devtools) install_github(‘mandymejia/ciftiTools’) For more information about ciftiTools, check out our paper in NeuroImage: Pham, D., Muschelli, J., & Mejia, A. (2022). ciftiTools: A package for reading, writing, … Continue reading R function to write CIFTI files

A layman’s guide to working with CIFTI files

Update 4/6/2022: Check out our ciftiTools R package, available via CRAN and Github! install.packages(“ciftiTools”) #install from CRAN library(devtools); install_github(“mandymejia/ciftiTools”) #install from GitHub We also have a paper about it out in NeuroImage: Pham, D., Muschelli, J., & Mejia, A. (2022). ciftiTools: A package for reading, writing, visualizing, and manipulating CIFTI files in R. NeuroImage, 118877. … Continue reading A layman’s guide to working with CIFTI files

Derivation and interpretation of leverage in SLR

I was recently looking online for an explicit derivation of leverage — the diagonals of the “hat matrix” — in simple linear regression. If X is the n-times-p matrix of explanatory variables in a linear model, then the hat matrix is H=X(X’X)-1X’, so called because it puts the “hat” on the predicted values, since Ŷ … Continue reading Derivation and interpretation of leverage in SLR

Tips for submitting to arXiv for the first time

Today I successfully submitted my first paper to arXiv!  We’ve submitted this paper to a journal, but it hasn’t been published yet, so we wanted to get a pre-print up before advertising the corresponding software packages.  Unfortunately, the process of submitting to arXiv wasn’t painless.  Now that I’ve figured out some of the quirks, however, hopefully your … Continue reading Tips for submitting to arXiv for the first time

Three ways to use MATLAB from R

Being a statistician working in neuroimaging is a little like living abroad and trying to speak a foreign language. For example, my first language is English, but I spent my first summer as a PhD student doing research at LMU in Munich, Germany. I had taken German in college and could have really basic conversations, … Continue reading Three ways to use MATLAB from R

Why I’m a Screen evangelist (and how to get started)

I’ve recently made several upgrades to my workflow that make me say “WHY OH WHY did it take me this long to start doing this?”  One of the big upgrades was using Sublime + Enhanced-R as explained by Alyssa Frazee to send code line-by-line to the Terminal with a simple keystroke.  Copy and paste no more!  It makes … Continue reading Why I’m a Screen evangelist (and how to get started)