name: title class: middle, center, dark
--- class: light, center, middle, clear # Some intro --- class: light # Goals for this section 1. **What is fMRI?** What does it measure? How can we use it? 2. **Regression and fMRI** How can we apply what we learned about regression to analyzing neuroimaging data? 3. **Multiple Comparisons** How can we tell if our results are real? --- class: light # Locating behavior in the brain <img src="figs-mri/brain_mapping.svg" width="100%" /> --- class: light # A variety of tools for studying the brain <img src="figs-mri/imaging_resolutions.png" width="70%" /> Available techniques vary in spatial resolution, temporal resolution, ease of use, etc --- class: light # EEG (ElectroEncephaloGraphy) EEG measures the (very weak) electrical activity generated by active neurons. EEG has very high temporal resolution and low spatial resolution. <img src="figs-mri/eeg_cap.png" width="35%" /> --- class: light # MEG (MagnetoEncephaloGraphy) MEG measures the magnetic field caused by electrically active neurons. MEG has high temporal resolution and low spatial resolution. <img src="figs-mri/MEG.png" width="35%" /> --- class: light # MRI (magnetic resonance imaging) The two primary image types that are used in cognitive neuroscience are __structural__ (sometimes called __anatomical__) and __functional__ images <img src="figs-mri/struct_func.svg" width="75%" /> --- class: light # Structural MRI <img src="figs-mri/struct.svg" width="35%" />
**Structural** images provide information about the anatomy of what's being imaged by showing differences between different kinds of tissues, bone, cerebro-spinal fluid etc
--- class: light # Functional MRI Puts the f in fMRI. <img src="figs-mri/func.svg" width="35%" />
**Functional** MRI scans produce a set of 3D images recorded over time. These images are lower spatial resolution than structual images. But unlike structural images, fMRI scans measure a signal that is related to neural activity.
--- class: light # MRI - Structure vs Function <img src="figs-mri/brain_basics_stripped.svg" width="100%" /> --- class: light # Making an MR image <img src="figs-mri/scanner_to_map.svg" width="100%" /> How do we get from an MRI scanner (and how does _that_ work?) to an image of the brain and then to a statistical map of brain responses? --- class: light <img src="figs-mri/scanner_schematic.png" width="100%" /> --- class: light # 25 to 65 microteslas for earth's magnetic field <img src="http://hyperphysics.phy-astr.gsu.edu/hbase/magnetic/imgmag/mearth.png" width="60%" /> --- class: light <img src="figs-mri/scanner_equipment.png" width="75%" /> --- class: light # Magnetic gradients and proton alignment <img src="figs-mri/body_magnet.svg" width="75%" /> MRI scanner has two primary gradients Protons inside the magnetic field align with the orientation of the main field (B_0) --- class: light # Radio Frequency excitation <img src="figs-mri/RF_pulse.png" width="55%" /> Energy at a specific frequency (RF pulse) is directed into the system Atomic nuclei have resonant frequency. RF pulse at resonant frequency knocks atoms out of alignment with main magnetic field As out of alignment atoms "relax" (release energy) they move back into alignment with the B_0 field, giving off energy at a characteristic frequency Measuring that released energy allows the MRI scanner to estimate the amount of that atomic type at a location in space --- class: light # BOLD imaging **B**lood **O**xygenation **L**evel **D**ependent <img src="figs-mri/brain_rest_energy.png" width="85%" /> --- class: light # Synaptic transmission is energy intensive <img src="figs-mri/synapse.png" width="55%" /> Ion channels require ATP. Oxygen facilitates ATP production --- class: light # The BOLD signal <img src="figs-mri/hemo_bold.svg" width="100%" /> - Neurons need oxygen and it is delivered by blood - Oxygenated and deoxgenated blood have different magnetic properties due to presence or absence of hemoglobin - Neural activity leads to consumption of oxgyen in nearby blood vessels and then an increase in oxygenated blood - These changing levels of oxygenated blood cause changes in the magnetic field, enabling an indirect measurement of neural activity --- class: light # Stimulus presentation changes BOLD in visual cortex <img src="figs-mri/BOLD_V1.svg" width="100%" /> --- class: light # Putting it together <img src="figs-mri/100_vox_tc.svg" width="85%" /> - fMRI gives us a timeseries of BOLD activation for each voxel in the brain while a participant views stimuli - How can we understand the relationship between these brain signals, external stimuli, and behavior? --- class: light # REGRESSION! <img src="figs-mri/V1_spm.svg" width="55%" /> One of the most common ways to analyze fMRI data and produce maps like this is to use regression --- class: light # Using regression to understand MRI data <img src="figs-mri/mri_regression_workflow.svg" width="100%" /> --- class: light # Using regression to understand MRI data <img src="figs-mri/regression_in_pictures.svg" width="100%" /> **Key Steps** - Measure timeseries of activation from many locations (voxels) in the brain - Construct predictors from stimulus presentation details - Conduct a regression analysis ***for each voxel*** - Determine which voxel timeseries are explained by predictor(s) - Make inferences about regional brain function based on which predictors explain regional BOLD activation --- class: light # Visualizing results aka blobs on brains <img src="figs-mri/V1_spm.svg" width="50%" /> Activation maps can show which voxel timecourses are explained by the predictors Maps show which voxels are ***significantly*** correlated with the timecourse of stimulus presentation --- class: light # The problem of multiple comparisons <img src="figs-mri/salmon_brain.svg" width="85%" /> - Bennett et al (HBM, 2009) scanned a dead salmon while they presented pictures of people - They observed several voxels in the salmon's brain that had timecourses significantly correlated with the timing of picture presentations - This doesn't seem right --- class: light # The problem of multiple comparisons <img src="figs-mri/salmon_and_cube.svg" width="85%" /> - In the grump ~ sleep example we learned how to test whether a predictor (sleep) scould explain the outcome in a single variable (grumpy) - In fMRI the logic is a little bit different - We look to see which, if any, voxel data can be explained by the predictor <img src="figs-mri/fishing.svg" width="15%" class="center"/> --- class: light # The problem of multiple comparisons <img src="figs-mri/salmon_and_cube.svg" width="85%" /> - There are thousands of voxels in an fMRI dataset (size of dimension 1 x size of dimension 2 x size of dimension 3) - Significance testing involves assessing whether some result is likely to happen by chance (i.e., is a _false positive_ or a _Type I error_) - Researchers choose an alpha level specifying the proportion of acceptable Type I errors in an analysis (p(false positive) < alpha) - How many false positives per hundred tests is implied by p < 0.05? How many voxels are in an fMRI dataset? --- class: light # Spurious correlations in random data <img src="figs-mri/random_corrs.svg" width="100%" class="center"/> - In the correlation chapter we learned that if you sample random numbers and compute correlations 1000 times you get a range of correlation values - Most values are close to zero but a small percentage of the simulations have strong correlations ***even though the data are random*** --- class: light # Spurious correlations in MRI data? <img src="figs-mri/cube_and_map.svg" width="65%" class="center"/> - The dimensions of a conventional fMRI volume are generally around 60 x 60 x 60 = 216,000 - This means 10s of thousands of voxels and we run a separate regression for each voxel - If p < 0.05 means 5% of observed significant results could be due to random chance, how many false positives might we expect in an MRI dataset? - And how can we know whether maps like the shown here are real results? --- class: light # Ameliorating the multiple comparison problem Running more statistical tests increases the possibility of type I errors - type I errors occur when a statistical test indicates an effect when in fact there was none There are two primary routes to controlling false positives in the presence of multiple comparisons: 1. Increasing the statistical threshold for accepting a result as significant 2. Decreasing the number of comparisons --- class: light # Bonferroni correction - Choosing an alpha level of 0.05 means one accepts the result of a single statistical test (e.g. a single regression analysis) as significant even if there is a 5% chance it is due to chance - Bonferroni correction extends this logic and controls for the Type I error rate _across all tests_ $\alpha$ --- class: light # Reducing the number of comparisons - prior knowledge [prior knowldge of e.g., anatomy means we don't look everywhere -- in extreme example the n voxels in volume includes outside of the head] --- class: light # Reducing the number of comparisons - prior knowledge [structure of the data -- eg smoothness, not all tests are independent, etc] --- class: light # Reducing the number of comparisons - generalizing to new data [take subset of significant effects in dataset 1, test that limited set in dataset 2] --- class: light # BOLD signal changes lag behind stimulus presentation <img src="figs-mri/stim_bold_lag.png" width="100%" /> --- class: light # Hemodynamic Response Function (HRF) <img src="figs-mri/HRF_labeled.png" width="85%" /> --- class: dark # What have we learned cont. 4. We use the term **correlation** to describe the relationship between the two measures, in this case we found a **positive** correlation --- class: light # Next class: Regression Lab! --- class: light # Python: sum of products ```python x = np.array([1,2,3,4,5]) y = np.array([4,3,6,7,8]) x*y ``` ```python array([ 4, 6, 18, 28, 40]) ``` ```python np.sum(x*y) ``` ``` 96 ``` --- class: light Thanks to Matt Crump for some of the slides.