First, let us estimate the activation within the ROI for the first run. There are three stages to the analysis:
The preprocessing for the example data created an SPM model for all three EPI runs, so we already have a design made for the first run. We are going to use this design and the trim_stim ROI to extract ROI data from the functional scans. Then we will use the design and the extracted data to estimate the model.
Click on the Design button in the MarsBaR window. You should get a menu like this:
Interface summary - design menu
The design menu offers options for creating, reviewing, estimating and processing SPM / MarsBaR designs.
Oddly, let us start at the end:
Now, from the top of the menu:
If you have been reading the interface summary, welcome back. Isn’t it strange how time just seems to stop when you are reading about graphical user interfaces?
Our plan was to choose our design. Select the Set design from file option in the design menu and choose the SPM.mat file in the sess1/SPM8_ana directory. MarsBaR loads the design into memory and displays the design matrix in the SPM graphics window.
Before we can run the model, we need to extract the ROI data from the functional scans. This brings us to the data menu:
We are going to choose Extract ROI data(default), and for simple analyses this may be all you will ever need. For those with a thirst for knowledge, here is the:
Interface summary - data menu
Again, welcome back to our linear readers. For the tutorial, we want to extract the data for our ROI, from the images in our design. Choose Extract ROI data(default); the GUI will ask you to select one or more ROIs files; select the trim_stim_roi.mat file. MarsBaR starts to whirr. As it whirrs, it will:
When it has finished, MarsBaR will calculate a new summary time course for each ROI. The summary time course has one value per scan, per ROI; by default, this new time course is made up of the means of all the voxel values in the ROI. For example, if there are only 5 voxels in the ROI, the first value in the summary time series will be the mean of the 5 voxel values for scan 1, the second value will be the mean of the 5 voxel values for scan 2, and so on. You can change the method of summarizing voxel data using the Statistics, Data summary function item in the MarsBaR options interface.
Technical note - the summary function
There are many ways to use ROI data, but the simplest approach, used by MarsBaR, is to treat the voxel values within the region of an image as many samples of the same signal. So, for each image, we find the voxels that are within the ROI, and calculate a single summary value to represent all the voxels in the ROI. This gives us one ROI summary value per image, and we can run the statistical model on this time-course of summary values.
The most obvious way of summarizing the values within the ROI is to take the mean. This is the default in MarsBaR. The mean can be greatly affected by outliers. If we suspect there may be outlier voxels in the ROI, the median may be more robust as a summary function. The other option offered as a summary function is the weighted mean. Usually ROIs are binary – meaning that they contain ones within the ROI and zeros elsewhere. In this case the weighted mean will be identical to the mean. However, it is possible to define ROIs which contain weighting values, where high values represent high confidence that this voxel is within the region of interest, and values near zero represent low confidence. In this situation, it can be useful to use the ROI values to weight the mean value.
Earlier versions of MarsBaR also offered the option of taking the first eigenvector of the signal. We removed it for version 0.42 because it seemed as if it was replicating the behavior of the SPM VOI routines - but it was not.
As MarsBaR extracts the data you will see its progress printed to the matlab console. When the extraction is done, the data is kept in memory. You can save the data to disk if you want using the Save data to file option on the data menu.
Now we have the design and the data we can estimate the model.
As the sweat pours from your brow, you click on the Results menu in the MarsBaR window. Scarcely believing it could be this easy, you choose the first item on the menu, Estimate results. It was that easy! MarsBaR takes the default design and the extracted data, and runs the model. There are more progress reports to the matlab console; finally you see the suggestion that you use the results section for assessment.