<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.scott5.org/index.php?action=history&amp;feed=atom&amp;title=FMRI</id>
	<title>FMRI - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.scott5.org/index.php?action=history&amp;feed=atom&amp;title=FMRI"/>
	<link rel="alternate" type="text/html" href="https://wiki.scott5.org/index.php?title=FMRI&amp;action=history"/>
	<updated>2026-04-12T19:10:03Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://wiki.scott5.org/index.php?title=FMRI&amp;diff=61&amp;oldid=prev</id>
		<title>Scott: /* Combining values from multiple subjects */</title>
		<link rel="alternate" type="text/html" href="https://wiki.scott5.org/index.php?title=FMRI&amp;diff=61&amp;oldid=prev"/>
		<updated>2011-01-29T00:07:45Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Combining values from multiple subjects&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Design of fMRI experiments==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;block design&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
** stimulus is presented in blocks of fixed length (eg 30s), alternated with blocks of fixation (control condition)&lt;br /&gt;
** useful for locating voxels in which activity is significantly different from control baseline&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;event-related design&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
** stimulus is presented in a brief flash, alternated with blocks of fixation for an &amp;#039;&amp;#039;&amp;#039;interstimulus interval&amp;#039;&amp;#039;&amp;#039; (ISI, eg 30s)&lt;br /&gt;
** can be more-flexible, and even subject-driven&lt;br /&gt;
** long ISI allows blood flow to return to baseline, allowing you to study the BOLD/HRF at a single voxel&lt;br /&gt;
&lt;br /&gt;
==Basic block analysis==&lt;br /&gt;
&lt;br /&gt;
* t-test: we are interested in the difference in activation between task and control stimulus&lt;br /&gt;
* For voxel i, &amp;lt;math&amp;gt;t_i = \frac{\bar{X}_{task} - \bar{X}_{control}}{se}&amp;lt;/math&amp;gt; where&lt;br /&gt;
** &amp;lt;math&amp;gt;\bar{X}_{task}&amp;lt;/math&amp;gt; is the average level of activation in voxel i over all times during which the task stimulus was displayed, and &amp;lt;math&amp;gt;\bar{X}_{control}&amp;lt;/math&amp;gt; is the average over control&lt;br /&gt;
** &amp;lt;math&amp;gt;se = s_p \sqrt{\frac{1}{n_{task}} + \frac{1}{n_{control}}}&amp;lt;/math&amp;gt; where&lt;br /&gt;
** pooled variance &amp;lt;math&amp;gt;s_p^2 = \frac{(n_{task} - 1)s^2_{task} + (n_{control} - 1)s^2_{control}}{n_{task} + n_{control} - 2}&amp;lt;/math&amp;gt;where&lt;br /&gt;
** &amp;lt;math&amp;gt;n_{task}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;n_{control}&amp;lt;/math&amp;gt; are the number of observations under each condition&lt;br /&gt;
** &amp;lt;math&amp;gt;s^2_{task}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;s^2_{control}&amp;lt;/math&amp;gt; are the sample variances of the activations of the two conditions&lt;br /&gt;
* The result is called a &amp;#039;&amp;#039;&amp;#039;statistical parametric map&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
* If there is more than one task condition, you can generate an F statistic at each voxel.&lt;br /&gt;
* An alternative to the t-test is &amp;#039;&amp;#039;&amp;#039;correlation analysis&amp;#039;&amp;#039;&amp;#039;. For voxel i calculate&lt;br /&gt;
** &amp;lt;math&amp;gt;r_i = r(S, X_i)&amp;lt;/math&amp;gt; where&lt;br /&gt;
** S is the pattern of zeros and ones describing the block design stimulus, and X is the activation time course of voxel i&lt;br /&gt;
** r is Pearson&amp;#039;s correlation coefficient:&lt;br /&gt;
** &amp;lt;math&amp;gt;r(Y, Z) = \frac{\sum_{j=1}^n (Y_j - \bar{Y})(Z_j-\bar{Z})}{\sqrt{\sum_{j=1}^n (Y_j - \bar{Y})^2\sum_{j=1}^n (Z_j - \bar{Z})^2}}&amp;lt;/math&amp;gt;&lt;br /&gt;
** in the case where there are exactly n/2 task trials and n/2 control trials, the correlation analysis reduces to the t-test:&lt;br /&gt;
*** &amp;lt;math&amp;gt;t_i = r_i\sqrt{\frac{n-2}{1-r_i^2}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Basic event-related analysis==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;trial averaging&amp;#039;&amp;#039;&amp;#039; - trials are sorted by condition type and then standard t-test or correlation analysis is performed&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;function estimation&amp;#039;&amp;#039;&amp;#039; - trying to estimate the HRF function at each voxel (why?)&lt;br /&gt;
** parametric - we assume a certain functional form for the HRF and then estimate the parameters with the data&lt;br /&gt;
** nonparametric - may map with knotted spline curves, lots of Bayesian estimation&lt;br /&gt;
&lt;br /&gt;
==General Linear Model==&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;math&amp;gt;Y = X\beta +\epsilon&amp;lt;/math&amp;gt;, where&lt;br /&gt;
** Y is the measured responses, a matrix with one row for each time, one column for each voxel&lt;br /&gt;
** X is design matrix and includes&lt;br /&gt;
*** binary or categorical variables reflecting the stimuli&lt;br /&gt;
*** predicted hemodynamic response&lt;br /&gt;
** &amp;lt;math&amp;gt;\beta&amp;lt;/math&amp;gt; the unknown coefficients of the design matrix, and&lt;br /&gt;
** &amp;lt;math&amp;gt;\epsilon&amp;lt;/math&amp;gt; the error, usually assumed to be normal with mean zero and variance &amp;lt;math&amp;gt;\sigma^2&amp;lt;/math&amp;gt;&lt;br /&gt;
* simplest approach assumes each voxel and time point independent and &amp;lt;math&amp;gt;\sigma^2&amp;lt;/math&amp;gt; constant, so &amp;lt;math&amp;gt;\beta&amp;lt;/math&amp;gt; can be estimated with least squares&lt;br /&gt;
* predicted hemodynamic response obtained by convolving the stimulus time course with a model for the HRF (e.g. gamma function model)&lt;br /&gt;
** &amp;lt;math&amp;gt;x_t = \int^\infty_0 h(u)s(t-u)du&amp;lt;/math&amp;gt;&lt;br /&gt;
** [[Image:convolution.png]]&lt;br /&gt;
* The general linear model makes strong assumptions about independence that in practice that probably aren&amp;#039;t realistic.&lt;br /&gt;
&lt;br /&gt;
==Mapping to a common brain (coregistration)==&lt;br /&gt;
&lt;br /&gt;
* Talaraich - a single postmortem brain with voxels defined at 1mm per side&lt;br /&gt;
* Montreal Neurological Institute (MNI) - average over 300 healthy brain scans&lt;br /&gt;
* nonlinear methods outperform simple affine transformations&lt;br /&gt;
&lt;br /&gt;
==Combining values from multiple subjects==&lt;br /&gt;
&lt;br /&gt;
We want to combine values at matching voxels over all subjects. There are many approaches, included simple average of the t statistic. A popular approach is to calculate the Fisher T statistic based on the p-value at each voxel:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;T_F = -2\sum_{i=1}^k \log{p_i}&amp;lt;/math&amp;gt; where i sums over the k subjects&lt;/div&gt;</summary>
		<author><name>Scott</name></author>
	</entry>
</feed>