psyc410_s2x:fmri_part2
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
psyc410_s2x:fmri_part2 [2025/04/06 10:02] – [Full Model - EVs] admin | psyc410_s2x:fmri_part2 [2025/04/06 11:05] (current) – removed admin | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | <WRAP center round todo 60%> | ||
- | <WRAP centeralign> | ||
- | <typo fs:36px; fc:red; fw: bold; fv: | ||
- | |||
- | <typo fs:20px; fc:black; fw: bold> | ||
- | </ | ||
- | </ | ||
- | |||
- | <WRAP centeralign> | ||
- | <typo ff:' | ||
- | Lab 8: fMRI Part 2: Preprocessing and Analysis with FSL </ | ||
- | </ | ||
- | |||
- | ====== Information, | ||
- | |||
- | In the last exercise, you analyzed fMRI data 'by hand' and conducted a simple correlation analysis by fitting an expected activation waveform to each voxel' | ||
- | |||
- | The lab exercise itself is not as long as this wiki page suggests. There are many choices in running an FSL analysis, and I tried to document the steps you should follow in enough detail so that you would not become frustrated by arcane details. <wrap em> | ||
- | |||
- | <WRAP center round alert 70%> | ||
- | As I've said many times... \\ | ||
- | **Don' | ||
- | </ | ||
- | |||
- | /* | ||
- | To help guide you through these analyses, I encourage you to make use of the FSL course materials that are found [[http:// | ||
- | */ | ||
- | ===== Assigned Readings / Videos: ===== | ||
- | |||
- | * | ||
- | |||
- | |||
- | /* | ||
- | <WRAP centeralign>// | ||
- | |||
- | * {{ : | ||
- | */ | ||
- | ===== Goals for this lab: ===== | ||
- | |||
- | In today' | ||
- | \\ | ||
- | \\ | ||
- | In this case, the localizer was used to identify brain regions activated by faces and scenes or by right and left hand movements. Each task is well documented in [[: | ||
- | |||
- | |||
- | ===== Software introduced in this lab ===== | ||
- | |||
- | * Today' | ||
- | * The documentation for FSL, in general, and for FEAT, in particular, is very extensive. I cannot repeat it all within this page, so I will provide links throughout this wiki page to the relevant FEAT documents. You can find the user guide for FEAT [[https:// | ||
- | |||
- | <WRAP center round info 90%> | ||
- | Some of the images used in tonight' | ||
- | </ | ||
- | ===== Laboratory Report ===== | ||
- | <WRAP center round important 70%> | ||
- | <WRAP centeralign>< | ||
- | * Throughout this (and all) lab exercise pages you will find instructions for your lab reports within these boxes. | ||
- | |||
- | </ | ||
- | |||
- | |||
- | |||
- | |||
- | ===== Housekeeping ===== | ||
- | |||
- | <WRAP center round todo 70%> | ||
- | **1. ** Correct the TR contained in the headers of tonight' | ||
- | * Download [[https:// | ||
- | * Click on the link. | ||
- | * Select '' | ||
- | * The file should now be in your '' | ||
- | |||
- | **2. ** Move the script into your '' | ||
- | |||
- | **3. ** Run the script from '' | ||
- | <code bash> | ||
- | source ~/ | ||
- | </ | ||
- | |||
- | <WRAP centeralign>< | ||
- | </ | ||
- | |||
- | |||
- | |||
- | |||
- | ===== Data used in this lab ===== | ||
- | |||
- | * You will use the same data that [[: | ||
- | * For each subject you will have: | ||
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | |||
- | The skull stripped anatomical images will be used to // | ||
- | |||
- | <WRAP center round info 90%> | ||
- | Throughout this wiki you should replace: | ||
- | |||
- | * **'' | ||
- | * **'' | ||
- | * **'' | ||
- | |||
- | If you ever see '' | ||
- | |||
- | </ | ||
- | |||
- | <WRAP center round alert 90%> | ||
- | |||
- | <WRAP centeralign>< | ||
- | |||
- | **Let me know if you struggled to find decent task-related activity for your subject and task in Lab 7**. If that's the case, we can find you a better one. | ||
- | |||
- | </ | ||
- | </ | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | ====== Part 1: Preprocessing preparatory for First Level Analysis ====== | ||
- | |||
- | ===== Skull Stripping ===== | ||
- | We will use the skills we developed with '' | ||
- | |||
- | <WRAP center round tip 90%> | ||
- | If you need a skull stripping refresher, have a look at the BET instructions from [[: | ||
- | </ | ||
- | |||
- | The skull stripped output brains will (by default) be named '' | ||
- | |||
- | **1.** Create a new directory to store the output from this week's lab. | ||
- | = | ||
- | <code bash> | ||
- | #!bash | ||
- | |||
- | # Create the output directory | ||
- | mkdir ~/ | ||
- | </ | ||
- | |||
- | **2.** Skull strip the coplanar and anatomical brains. | ||
- | * ''/ | ||
- | * ''/ | ||
- | |||
- | <WRAP center round tip 90%> | ||
- | To save yourself a lot of traversing through file manager boxes to find the relevant files, launch '' | ||
- | </ | ||
- | |||
- | {{ : | ||
- | |||
- | <WRAP center round alert 90%> | ||
- | Remember that you can read the unstripped brains from the '' | ||
- | |||
- | input: | ||
- | output: / | ||
- | </ | ||
- | |||
- | ===== Preprocessing with FEAT ===== | ||
- | **// | ||
- | |||
- | Here are the preprocessing steps we will use this week: | ||
- | * **skull stripping** of both anatomical and functional datasets | ||
- | * Note: you already stripped the anatomical data sets in Part 1 | ||
- | * The 4D fMRI images (i.e., functional data set) will be skull stripped within '' | ||
- | * **motion correction** | ||
- | * **temporal filtering** (aka " | ||
- | * **spatial filtering** (aka " | ||
- | * **slice-time correction** | ||
- | |||
- | <WRAP center round tip 60%> | ||
- | We refer to fMRI data as four dimensional (4D) because in addition to our three spatial dimensions (x, y, z), we have time as the fourth dimension. | ||
- | </ | ||
- | |||
- | |||
- | To get started, start FSL and then choose the '' | ||
- | |||
- | {{ : | ||
- | |||
- | At the top of the window you'll see a drop down menu with two options: '' | ||
- | |||
- | A **First Level Analysis** measures the degree to which | ||
- | * the activation time-course of each individual voxel is related to each regressor (i.e., " | ||
- | * a voxel is differentially affected by one regressor compared to other regressors (a // | ||
- | |||
- | A **Higher Level Analyses** will | ||
- | * summarize results across all of the runs of an individual subject (//Second Level Analysis//) | ||
- | * combine the data across multiple subjects (//Third level analysis// | ||
- | |||
- | In this part we want the two dropdown menus set to '' | ||
- | |||
- | <WRAP center round tip 90%> | ||
- | Note that, by default, FEAT has " | ||
- | </ | ||
- | |||
- | ===== FEAT: Data Tab ===== | ||
- | | ||
- | |||
- | **1.** You should first analyze the data from a single run of your data. | ||
- | * Set your '' | ||
- | * Press the **'' | ||
- | * Choose the functional data from your first run: '' | ||
- | |||
- | {{ : | ||
- | |||
- | **2.** Be sure to specify your **'' | ||
- | * You will set yours to: ''/ | ||
- | * Don't forget to replace '' | ||
- | |||
- | **3.** Check parameters | ||
- | * The **TR** should come up automatically as '' | ||
- | * The **Total volumes** should come up automatically as '' | ||
- | * If either of these values is incorrect, make sure you have loaded the correct dataset. | ||
- | |||
- | <WRAP center round info 90%> | ||
- | Remember that'' | ||
- | </ | ||
- | |||
- | <WRAP center round help 90%> | ||
- | We have 150 volumes with TR = 2s. What is the total duration of our time-series? | ||
- | </ | ||
- | |||
- | <WRAP center round tip 90%> | ||
- | Remember, a high-pass filter gets rid of low frequency signal. That is, a high-pass filter is like a bouncer that only allows high frequencies to " | ||
- | </ | ||
- | |||
- | |||
- | **5.** The **'' | ||
- | * We must be careful not to set our filter too high, or it might remove some of our signal of interest. | ||
- | * Let's try a filter with a period of '' | ||
- | * this means we will filter out any signals that are slower than once per 60 seconds, or 1/60 = .016 Hz. | ||
- | |||
- | {{ : | ||
- | |||
- | |||
- | ===== FEAT: Pre-stats Tab ===== | ||
- | The pre-stats tab controls several preprocessing steps. Detailed information regarding the '' | ||
- | |||
- | **1.** **'' | ||
- | |||
- | **2.** The **'' | ||
- | * Select '' | ||
- | |||
- | **3.** **'' | ||
- | * Make sure this is checked. | ||
- | |||
- | **4.** **'' | ||
- | * Leave this set to its default value of '' | ||
- | |||
- | **5.** **'' | ||
- | |||
- | There are several other processes that we are not choosing for this dataset. For example, we are not **'' | ||
- | |||
- | ===== FEAT: Registration Tab ===== | ||
- | |||
- | The registration tab sets up the coregistration between this subject' | ||
- | |||
- | Recall that we previously normalized an individual subject' | ||
- | |||
- | **1.** Check the box next to '' | ||
- | The **'' | ||
- | * For this subject, this should be the **skull stripped** output file that you created in [[#Skull Stripping|Part 1]] -- '' | ||
- | * Select '' | ||
- | |||
- | **2.** The **'' | ||
- | * For this subject, this should be the **skull stripped** output file that you created in [[#Skull Stripping|Part 1]] -- '' | ||
- | * Select '' | ||
- | |||
- | **3.** The **'' | ||
- | * We will use the MNI 152 brain template brain at 2x2x2 mm resolution (this is the default) | ||
- | * Select '' | ||
- | |||
- | {{ : | ||
- | |||
- | During registration: | ||
- | - The low resolution functional MR images are first registered to the low resolution coplanar structural images. | ||
- | - The low resolution coplanar structural images are then coregistered with the same individual' | ||
- | - This high resolution main structural image is then coregistered with the template MNI brain. | ||
- | - One can then derive a registration of the functional MR images to the template MNI brain by combining the transformation matrices (i.e., directions that tell the software how to get from A to B). All of the various transformation matrices are saved for later use. | ||
- | |||
- | <WRAP center round alert 60%> | ||
- | <WRAP centeralign> | ||
- | <WRAP centeralign> | ||
- | </ | ||
- | |||
- | ===== LAB REPORT Part 1 ===== | ||
- | <WRAP center round important 100%> | ||
- | <WRAP centeralign> | ||
- | <WRAP centeralign> | ||
- | <typo fs:x-large; fc:purple; fw:bold; text-shadow: | ||
- | LAB REPORT Part 1 | ||
- | </ | ||
- | </ | ||
- | |||
- | - Provide a flowchart (with text or graphics) of the preprocessing steps used in this analysis. | ||
- | - Be sure to include a brief description of why each step is performed and what effect you expect it to have on your data. | ||
- | </ | ||
- | |||
- | ====== Part 2: Creating a statistical model for a First Level Analysis ====== | ||
- | |||
- | ===== Overview of analysis ===== | ||
- | |||
- | /*A detailed description of multi-level analysis in FSL can be found [[http:// | ||
- | |||
- | FSL conceives of an fMRI analysis as consisting of several **levels**. | ||
- | |||
- | * **__First Level Analysis__** is performed on individual runs. So, if your experiment involves repeating a task several times, each task run would be submitted to a first level analysis. In the first level analysis, a multiple regression (**G**eneral **L**inear **M**odel-GLM) is performed by fitting your expected activation templates to the raw time-courses of each individual voxel. Thus, you must specify your model (when do you predict activity associated with your task) in the first level analysis. The first level analysis also includes all of the pre-processing steps, such as smoothing, motion correction, slice-time correction, etc. | ||
- | |||
- | * **__Second Level Analysis__** is used if you have collected multiple experimental runs on a subject. This analysis is run on the individual first-level analyses. In the second level analysis, you are statistically combining the results of each single run into an // | ||
- | |||
- | * **__Third Level Analysis__** is used to combine multiple experimental runs on multiple subjects. This analysis is run on the individual second-level analyses. In the third-level analysis, you are statistically combining the results of each subject into an // | ||
- | |||
- | * **__Fourth Level Analsyis__** is used if you have collected multiple experimental runs on multiple subjects that constitute two or more treatment groups (e.g. drug group and placebo group). This analysis contrasts the third-level results for the different groups. Fourth-level analyses are common in clinical studies that compare, for example, depressed individuals to non-depressed individuals. | ||
- | |||
- | In FSL/FEAT, you have a choice in the GUI to choose '' | ||
- | |||
- | ===== FEAT: Stats Tab ===== | ||
- | |||
- | The statistical model is specified in the Stats Tab. This is the most complicated part of the process, and the GUI is quite flexible and allows for the specification of complex experimental designs. Happily, our design is quite simple and easy to specify. | ||
- | |||
- | You may wish to consult with the FSL FEAT documentation as you read along with my documentation. Details regarding the Stats Tab can be found [[https:// | ||
- | |||
- | {{ psyc410: | ||
- | |||
- | Recall that last week you specified a simple single template (and then two templates) of the expected activation and we conducted a correlation between that template and the time course of each voxel. Here, instead of using correlation to look for our signal, we will use multiple regression (' | ||
- | |||
- | ==== Stimulus Timing Files ==== | ||
- | |||
- | The most important prerequisite for specifying the model is to have an accurate stimulus timing file that specifies **when the stimulus occurred (in seconds) relative to the beginning of the fMRI time series of volumes**. The file also includes values indicating the stimulus: | ||
- | * duration | ||
- | * relative weighting | ||
- | |||
- | <WRAP center round alert 70%> | ||
- | When you made your template by hand last week, you specified when the task was on ('' | ||
- | </ | ||
- | |||
- | |||
- | **There needs to be a separate timing file for each experimental factor (called // | ||
- | |||
- | <WRAP center round info 80%> | ||
- | We have used lots of different terms to refer to essential the same thing ... | ||
- | |||
- | **regressor** | ||
- | **predictor** | ||
- | **explanatory variable (EV)** | ||
- | **template** | ||
- | |||
- | These all refer to the timing of the activation we predict to be caused by our task (or by nuisance regressors such as head motion). | ||
- | |||
- | The term **model** can refer to a single EV, but is often used to refer to the collection of //all// of our EVs. | ||
- | </ | ||
- | |||
- | |||
- | The timing file below is for the '' | ||
- | |||
- | <code text> | ||
- | 30 12 1 | ||
- | 78 12 1 | ||
- | 126 12 1 | ||
- | 174 12 1 | ||
- | 222 12 1 | ||
- | 270 12 1 | ||
- | </ | ||
- | |||
- | * The three columns represent **onset time**, **duration**, | ||
- | * The onset time is...well...the time the stimulus started. | ||
- | * The duration is how long the stimulus was on for (pretty straightforward!) | ||
- | * The weighing column is for when we might want to scale our predictors. For example, let's say I play two tones: A and B. And I can play each one at two different volumes: low and high. In that case I might want to set the weighting of the low volume = 1 and for the high volume = 2. | ||
- | * For this lab, we will always have the weightings set to 1. | ||
- | * Each row represents the start of a new stimulus block (either face perception or right-hand finger tapping) | ||
- | * So the first row specifies that our stimulus started at 30 seconds and lasted for 12 seconds, and that we will have a simple weighing of 1. The second block of faces (or right hand tapping) began at 78 seconds and lasted for for 12 seconds. | ||
- | * There were six blocks of faces in this first data run. | ||
- | |||
- | The timing file below is for the '' | ||
- | |||
- | <code text> | ||
- | 6 12 1 | ||
- | 54 12 1 | ||
- | 102 12 1 | ||
- | 150 12 1 | ||
- | 198 12 1 | ||
- | 246 12 1 | ||
- | </ | ||
- | |||
- | Note that the scene and face blocks alternate with a 12 second blank period between the end of one block and the start of the next block. For example, the first '' | ||
- | |||
- | <WRAP center round info 90%> | ||
- | Normally, good experimental design would require you to change the stimulus timing for each run to avoid //order effects//. In setting up these experiments, | ||
- | |||
- | __You can therefore use the same timing files for faces and scenes for each run__, instead of needing to create a unique file for each condition in each run. | ||
- | </ | ||
- | |||
- | **1.** Create your task timing for each explanatory variable (i.e., one for face and one for scene //or// one for right-hand and one for left-hand) in a separate text file. | ||
- | * Use '' | ||
- | * [[: | ||
- | * Save the timing in files named: | ||
- | * **face_timing.txt** and **scene_timing.txt** for the //Face task// | ||
- | * **right_timing.txt** and **left_timing.txt** for the //Motor task// | ||
- | * Save these timing files in '' | ||
- | |||
- | <WRAP center round alert 70%> | ||
- | For the rest of the lab I will only refer to the '' | ||
- | </ | ||
- | |||
- | |||
- | |||
- | |||
- | ==== Full Model - EVs ==== | ||
- | In setting up our statistical regression model, we wish to create ' | ||
- | |||
- | **2.** To generate your model, begin by clicking on the '' | ||
- | |||
- | {{ psyc410: | ||
- | \\ | ||
- | |||
- | * We have two EVs - faces and scenes - so choose '' | ||
- | * For the first EV (tab 1), give it the name '' | ||
- | * For **Basic Shape**, choose '' | ||
- | * For **Filename**, | ||
- | * For **Convolution**, | ||
- | * The **Phase**, **Stddev**, and **Mean lag** of the HRF will be set to '' | ||
- | * **Turn off** the '' | ||
- | * **Turn on** the '' | ||
- | * This will apply the same filter to your expected activation template as you applied to your raw fMRI data on the earlier tab. | ||
- | |||
- | Repeat this process for Tab '' | ||
- | |||
- | **3.** Now choose '' | ||
- | |||
- | We asking our model to create the following four contrasts: | ||
- | - The BOLD response to faces greater than Baseline. | ||
- | - The BOLD response to scenes greater than Baseline. | ||
- | - The Face response greater than the Scene response. | ||
- | - The Scene response greater than the FACE response. | ||
- | |||
- | ^ Title ^ | ||
- | |Face | 1 | | ||
- | |Scene | ||
- | |Face > Scene| | ||
- | |Scene > Face| -1 | | ||
- | |||
- | {{ psyc410: | ||
- | |||
- | |||
- | When you are done, click the '' | ||
- | |||
- | \\ | ||
- | {{ psyc410: | ||
- | \\ | ||
- | |||
- | |||
- | <WRAP center round alert 60%> | ||
- | <WRAP centeralign> | ||
- | <WRAP centeralign> | ||
- | </ | ||
- | |||
- | ===== LAB REPORT Part 2 ===== | ||
- | <WRAP center round important 100%> | ||
- | <WRAP centeralign> | ||
- | <WRAP centeralign> | ||
- | <typo fs:x-large; fc:purple; fw:bold; text-shadow: | ||
- | LAB REPORT Part 2 | ||
- | </ | ||
- | </ | ||
- | |||
- | - Include a figure showing your model design. | ||
- | - If you didn't take a screenshot, you can find this image in your output directory named design.png | ||
- | - Why do we convolve our model with an approximate hemodynamic response function? | ||
- | - What benefit does this have over simply time-shifting our box-car model (as you did in the last lab)? | ||
- | </ | ||
- | |||
- | |||
- | ====== Part 3: Post-statistics significance testing ====== | ||
- | |||
- | There are several methods offered by FSL/FEAT for testing the significance of the statistical model. Students should be aware that, in FSL, the higher level analyses use the full range of statistics and variances from the lower level analyses. That is, FSL does not 'pass up' thresholded statistics to the next level of analysis. However, when you decide to review the significance of your model, at any level, you may likely want to correct for the number of statistical comparisons you performed. | ||
- | |||
- | You may wish to consult the FSL FEAT documentation for the Post-stats tab [[http:// | ||
- | |||
- | <WRAP center round box 90%> | ||
- | <WRAP centeralign> | ||
- | The multiple comparisons problem is beyond the scope of this wiki page, and I will discuss it during class. It is important, however, that you understand this problem as it comes up frequently in imaging research (where there can be tens of thousands of voxels, and each is treated as a dependent variable). It also comes up in many other areas of research, such as genetics, where many thousands of gene variations are regressed against thousands of phenotypes). | ||
- | * Here is a [[http:// | ||
- | * [[http:// | ||
- | * This [[http:// | ||
- | * This [[http:// | ||
- | </ | ||
- | |||
- | We will set our method for correcting for multiple comparisons in the '' | ||
- | - '' | ||
- | - '' | ||
- | - '' | ||
- | - '' | ||
- | |||
- | {{ : | ||
- | |||
- | For your first level analyses, it doesn' | ||
- | |||
- | For our first-level analysis let's be very liberal and set **Thresholding** to '' | ||
- | |||
- | FSL also includes other tests that are not yet accessible through the FEAT GUI, but can be applied through the command line. One relatively new correction for multiple comparisons available through FSL's command line is the //False Discovery Rate (FDR)//. Tom Nichol' | ||
- | |||
- | |||
- | ===== LAB REPORT Part 3 ===== | ||
- | <WRAP center round important 100%> | ||
- | <WRAP centeralign> | ||
- | <WRAP centeralign> | ||
- | <typo fs:x-large; fc:purple; fw:bold; text-shadow: | ||
- | LAB REPORT Part 3 | ||
- | </ | ||
- | </ | ||
- | |||
- | - There are no questions for this part. | ||
- | </ | ||
- | |||
- | |||
- | ====== Part 4: Running the First Level Analysis ====== | ||
- | |||
- | ===== Run the first functional run ===== | ||
- | **1.** Once you have entered all of the required information into the FEAT GUI, you should <wrap em>save the file you have created to disk</ | ||
- | * Select the '' | ||
- | * Make sure to give it a name you'll remember (e.g., '' | ||
- | * FSL will append an '' | ||
- | |||
- | **2.** And now for the moment of truth. Pretty exciting, right!? | ||
- | * Click on the **'' | ||
- | * If you have entered everything correctly, FSL will start processing according to the parameters you entered. | ||
- | |||
- | <WRAP center round info 90%> | ||
- | FSL creates an HTML file ('' | ||
- | |||
- | <wrap em>It will take some time to complete processing (10-12 minutes)</ | ||
- | </ | ||
- | |||
- | ===== Run the second functional run ===== | ||
- | |||
- | While FSL is working (assuming that it is running correctly) on run 01, you can start setting up your First Level Analysis for the second and third functional runs for your participant. | ||
- | |||
- | **1.** Set up FEAT for run02 | ||
- | - In the '' | ||
- | - Set your '' | ||
- | - (of course this should now be '' | ||
- | - Save your setup file for run02 as you did for run01 | ||
- | |||
- | All other parameters are still set correctly from '' | ||
- | |||
- | **2.** Press **'' | ||
- | * You can do this even if your first analysis is still running, though it might slow down your computer quite a bit. | ||
- | |||
- | ===== Run the third functional run ===== | ||
- | |||
- | If you are analyzing data from the '' | ||
- | |||
- | <WRAP center round tip 90%> | ||
- | While you wait for your two (or three) runs of data to finish processing, you should read on through the wiki to preview what steps are coming up next. | ||
- | </ | ||
- | |||
- | |||
- | ===== Run analysis on data that has not been preprocessed ===== | ||
- | The last first-level analysis we will run tonight will be on data that does not first get preprocessed. In your open '' | ||
- | * Data tab | ||
- | * select the run01 data for your task | ||
- | * set the output directory to ''/ | ||
- | * Pre-stats tab | ||
- | * Set Motion correction to '' | ||
- | * Set Slice timing correction to '' | ||
- | * Set spatial smoothing to '' | ||
- | * For temporal filtering, unselect '' | ||
- | * Stats tab | ||
- | * On the EVs 1 tab, unselect '' | ||
- | * Do the same for the EV 2 tab | ||
- | * Everything else can stay the same | ||
- | * **'' | ||
- | ==== Check for Errors on your Report Log HTML Page ==== | ||
- | <WRAP center round info 90%> | ||
- | As long your HTML log file is not printing pages of error messages, you should be fine. However, if you do observe error messages in your HTML log, read them carefully. Errors will almost certainly be due to an incorrect specification of an input file (wrong name, wrong path, etc.), or because you are trying to write output to a "read only" folder. Check carefully and try to solve these errors on your own before calling me to help. Solving mundane technical problems is a bigger part of science than we care to admit! | ||
- | |||
- | {{ : | ||
- | </ | ||
- | |||
- | |||
- | ===== LAB REPORT Part 4 ===== | ||
- | <WRAP center round important 100%> | ||
- | <WRAP centeralign> | ||
- | <WRAP centeralign> | ||
- | <typo fs:x-large; fc:purple; fw:bold; text-shadow: | ||
- | LAB REPORT Part 4 | ||
- | </ | ||
- | </ | ||
- | |||
- | - There are no questions for this part. | ||
- | </ | ||
- | |||
- | ====== Part 5: Exploring your results ====== | ||
- | |||
- | ===== FEAT Output ===== | ||
- | FEAT will create a directory with whatever output name you specified and the suffix '' | ||
- | |||
- | Inside this directory there will be a file named '' | ||
- | |||
- | The directory will also contain lots of other files and subdirectories. A full list can be found [[https:// | ||
- | |||
- | ===== Review the Results on the HTML Page ===== | ||
- | |||
- | <WRAP center round important 60%> | ||
- | For this section look at the output for any of your first-level analysis //except// for '' | ||
- | </ | ||
- | |||
- | |||
- | You can begin to review your results as soon as the HTML output indicates that the first level analysis is complete (note, while it is running, the words “Still Running” appear in red font on your HTML log page). | ||
- | |||
- | There is a lot of information in the HTML file. To get you jump-started, | ||
- | |||
- | * '' | ||
- | * The first array of brain slices shows the results of your first contrast (either '' | ||
- | * In other words, this shows all the voxels in which the condition predicted the brain activity at p < .05. Importantly, | ||
- | * '' | ||
- | * The second array of brain slices shows the results of your second contrast (either '' | ||
- | * In other words, this shows all the voxels in which the condition predicted the brain activity at p < .05. Importantly, | ||
- | |||
- | <WRAP center round info 80%> | ||
- | Note that you can have the same voxels activated in both of these first two contrasts. For example, you might expect that visual cortex is activated by both faces and scenes, and so those visual cortex voxels should be activated in both of the first two contrasts. | ||
- | </ | ||
- | * '' | ||
- | * We've subtracted out all of the activation that was in common between '' | ||
- | * '' | ||
- | * We've subtracted out all of the activation that was in common between '' | ||
- | | ||
- | <WRAP center round info 80%> | ||
- | Unlike the first two contrasts, there should be no voxels will be in common between these latter two contrasts. | ||
- | </ | ||
- | | ||
- | {{ : | ||
- | |||
- | |||
- | <WRAP center round info 90%> | ||
- | It will be more informative to fully investigate your activation results after you complete the Second Level Analysis. So, look at your results here in the HTML output, visually compare the activation patterns in the first and second runs to get a sense of the consistency, | ||
- | </ | ||
- | |||
- | |||
- | |||
- | |||
- | ===== LAB REPORT Part 5 ===== | ||
- | <WRAP center round important 100%> | ||
- | <WRAP centeralign> | ||
- | <WRAP centeralign> | ||
- | <typo fs:x-large; fc:purple; fw:bold; text-shadow: | ||
- | LAB REPORT Part 5 | ||
- | </ | ||
- | </ | ||
- | |||
- | - Include a figure of your run 1 contrast 3 results taken from your html output file. | ||
- | - What do these results show? (I'm looking for a general description of the contrast more than a detailed analysis fo the specific activation pattern. In other words, what question could contrast 3 answer that the other contrasts could not.)</ | ||
- | |||
- | </ | ||
- | |||
- | ====== Part 6: What did preprocessing do to your input data? ====== | ||
- | |||
- | Several pre-processing steps were included in the first level analysis. Were they effective? Let's do a direct comparison of our raw data and the preprocessed data using '' | ||
- | |||
- | **1.** Launch '' | ||
- | |||
- | **2.** Load two files: | ||
- | * your raw data set | ||
- | * e.g., '' | ||
- | * your preprocessed data set | ||
- | * e.g., '' | ||
- | |||
- | <WRAP center round info 70%> | ||
- | Of course, replace '' | ||
- | </ | ||
- | |||
- | **3.** Open a second viewer to view the files side by side | ||
- | * '' | ||
- | * In the left window, deselect the '' | ||
- | * In the right window, deselect the '' | ||
- | * So you should have the raw data displayed in the left windows, and your preprocessed data displayed in the right windows: | ||
- | |||
- | {{ : | ||
- | |||
- | <WRAP center round tip 80%> | ||
- | Notice that when you click at a location on one of the brains, the cursor will jump to the same location in the other brain. | ||
- | </ | ||
- | |||
- | **4.** Display the raw and preprocessed data sets' time-series. | ||
- | * Press '' | ||
- | * This will only turn on the time-series from one of the brains. Turn on the other one by selecting the grey eye in the '' | ||
- | * Select '' | ||
- | |||
- | **5.** Turn off the modeled time-series. | ||
- | * You should now see three different waveforms: the raw voxel time-series, | ||
- | * Highlight the '' | ||
- | * Select the wrench icon in the '' | ||
- | * Unselect '' | ||
- | * In the image below, the '' | ||
- | |||
- | {{ : | ||
- | |||
- | |||
- | **6.** Compare the raw time-series with the preprocessed time-series. You might want to try this at a few different voxels. | ||
- | * Can you see differences in the time-series? | ||
- | * The easiest difference to identify 'by eye' is the impact of the highpass filter. | ||
- | * We'll have another look at the effect of preprocessing in the next section. | ||
- | |||
- | ===== LAB REPORT Part 6 ===== | ||
- | <WRAP center round important 100%> | ||
- | <WRAP centeralign> | ||
- | <WRAP centeralign> | ||
- | <typo fs:x-large; fc:purple; fw:bold; text-shadow: | ||
- | LAB REPORT Part 6 | ||
- | </ | ||
- | </ | ||
- | |||
- | - There are no questions for this part. | ||
- | |||
- | </ | ||
- | |||
- | |||
- | |||
- | ====== Part 7: How well did your model account for you activation results? ====== | ||
- | |||
- | As discussed in the lecture, you should examine your residuals to see how well your model accounts for the time-course of your activations. | ||
- | |||
- | <WRAP center round tip 90%> | ||
- | You want the ratio of explained variance to unexplained variance to be as large as possible. The residuals represent the unexplained variance and therefore you want them as small as possible. | ||
- | </ | ||
- | |||
- | **1.** Load the following files into '' | ||
- | * '' | ||
- | * '' | ||
- | * Change the color from '' | ||
- | * You should now see " | ||
- | |||
- | **2.** Click on a strongly activated voxel (colored yellow). | ||
- | |||
- | **3.** View the time-series | ||
- | * Press '' | ||
- | * Highlight '' | ||
- | * Click on the wrench icon | ||
- | * In the '' | ||
- | * Select '' | ||
- | * Unselect everything else | ||
- | |||
- | **3.** Look at the residual for that voxel and judge whether the activation waveshape is largely absent. If it is, it means that your model successfully accounted for the activation, and there is no task-related activation left in the residual error term. | ||
- | |||
- | **4.** Load the data that was analyzed with preprocessing. | ||
- | * Add '' | ||
- | * In the Time series window, change the settings to only show the residuals (as you just did above) | ||
- | |||
- | <WRAP center round tip 80%> | ||
- | It will be best to view these residual timeseries with the '' | ||
- | </ | ||
- | |||
- | **5.** You should now see the residuals from each of the two data sets. Remember, these are identical data sets that were analyzed with the exact same model. The only difference was that one was preprocessed and the other was not. Do you observe larger residuals (i.e., more unexplained variance) for the data that was not preprocessed? | ||
- | |||
- | |||
- | ===== LAB REPORT Part 7 ===== | ||
- | <WRAP center round important 100%> | ||
- | <WRAP centeralign> | ||
- | <WRAP centeralign> | ||
- | <typo fs:x-large; fc:purple; fw:bold; text-shadow: | ||
- | LAB REPORT Part 7 | ||
- | </ | ||
- | </ | ||
- | |||
- | - Include a figure showing a residuals time-series comparison from a voxel that you think clearly highlights the benefit(s) of preprocessing. That is a voxel in which you believe the residuals after preprocessing are smaller than the residuals without preprocessing. | ||
- | - Specifically, | ||
- | |||
- | </ | ||
- | |||
- | |||
- | |||
psyc410_s2x/fmri_part2.1743951765.txt.gz · Last modified: 2025/04/06 10:02 by admin