Thursday, May 29, 2014

Setting up my new laptop

I recently bought a new laptop, nothing fancy - just another MB Pro. My general resistance to change (and yes, I know it's a character flaw) compelled me to buy something that would require minimal time to get used to. At the same time, I do like to start afresh, so I rarely transfer settings/preferences from my old computer to the new one, which means that for the preferences that I do like to keep, I'll have to reconfigure them again.

Unfortunately, I have forgotten how I made those changes in the first place (especially the small ones), and had to figure them out one-by-one. So I thought I would start a post with the steps I took to set up this laptop, and I'll have something to refer to for the next

Let's start with Google Chrome

1. I was rather annoyed when they took google scholar away from the google page (this was about what, 3 years ago now?), because it meant a few extra clicks needed to search for a paper. I know it's not THAT much time, but hey, minimize all transaction cost right ;). Fortunately, Chrome allows you to search from different search engines from the "omnibar" (seriously, the address bar is a much more intuitive name). This is how you do it:

Chrome > Settings > Search > Manage Search Engines
Add:
First Column - Google Scholar (or name of any other search engine)
Second Column - Easy to type shorcut (I use "s")
Third Column - http://scholar.google.com/scholar?hl=en&q=%s

The next time you want to do a google scholar search, all you need to do is to type the shortcut in the address bar, and there you go, google scholar in your address bar!

2. Default font in blogger
Blogging in Times feels so formal, which discourages me from blogging. I've changed the default font on blogger to Arial, just so I don't have to change it everytime. This is a chrome setting, and not a blogger setting. To change it, go to

Chrome > Settings > show advanced settings > Web Content > Customize Font > Standard font

Changing the standard font here will change the default font in blogger.

3. Syncing Zotero with Dropbox
Zotero is a citation management application. It's the one I use, no special reason, since I think the major ones are all pretty similar. That said, I do have a soft spot for zotero because it's open source and not owned by a certain publishing giant.

I am hoping to make any computer a working computer, so I'm slowly migrating everything to cloud servers. It would be nice if I had all my papers in one place accessible from anywhere/even offline. To do this with zotero, simply create a zotero folder in dropbox, and change the appropriate settings in zotero for all computers.

Zotero > Preferences > Advances > Data Directory > Custom > (path to dropbox zotero folder)

Wednesday, May 14, 2014

Model-based fMRI

Standard fMRI analysis uses GLMs, so most fMRI analyses are technically "model-based". But that's not what I am going to write about today. Instead, I will be talking about model-based fMRI where one combines computational models of cognition with fMRI to find neural correlates of different cognitive processes. I only hope to give an introduction to the topic. For a more detailed treatment, one can turn to the following two resources:

Daw, Nathaniel D. "Trial-by-trial data analysis using computational models."Decision making, affect, and learning: Attention and performance XXIII 23 (2011): 3-38

and 

O'Doherty, John P., Alan Hampton, and Hackjin Kim. "Model‐Based fMRI and Its Application to Reward Learning and Decision Making." Annals of the New York Academy of Sciences 1104.1 (2007): 35-53.

What is model-based fMRI?
For many years, psychologists have built computational models to study human cognition. These models describe cognitive processes in terms of algorithms (variables and operations). They are then fit to behavioral data collected from real human participants to assess if the cognitive processes posited by the model are indeed descriptive of participants' mental operations. 

Model-based fMRI is an extension of the computational modeling of cognition. Instead of fitting to behavioral data, the computational models are fitted to fMRI data time-series. Finding neural activity that encodes the cognitive variables assumed by the model would provide additional validity of the models, and provide insight into how the cognitive operations assumed in the model might be implemented in the brain.

Why do model-based fMRI?
As I see it, there are two main advantages:
1. Computational models will allow you to track the trial-by-trial dynamics of cognitive/neural processes, so you can see them unfold over time. Both event-related trial-averaging and block designs lose this level of granularity.

2. Model-based fMRI allows you to study how a cognitive process is implemented in the brain, and not just where it is occurring. While localization of function is important, I do think that most neuroscientists would agree that we would prefer if we could understand brain function at the mechanistic level.

A recipe for  standard model-based fMRI
This is taken from O'Doherty et al. (2007), which I recommend to anyone who is interested in using model-based fMRI for their studies.
  1. Fit computational model to participants' behavioral data to obtain optimal model parameters that maximize the "fit" between model and data.
  2. Using the best-fitting model and model parameters, generate a time-series for the cognitive variable of interest (e.g. value of chosen stimulus, prediction errors, confidence etc etc.). This time series can be thought of as the experimenter's best estimate of what the participant is "thinking" at each time point.
  3. Convolve time-series with the hemodynamic response function. The resulting time-series can be thought of what the BOLD activity of a brain area encoding the cognitive variable of interest would look like, given the experimenter's best estimate of the variable.
  4. Regress time-series with fMRI data to find voxels that correlate with cognitive variables of interest
I'd be happy to talk about the method. Leave a comment or drop me an email.