Here I’ll just briefly review how to export an SPM12 statistics results table. This is useful for preparing manuscripts. You don’t want to have to retype everything into your own table; that could take forever!

Open the results

First, you’ll want to open your results of interest. Usually you’d just click the Results button on the green SPM GUI > open the SPM.mat second level analysis of interest > threshold accordingly. Here I’m actually looking to export results calculated by the SwE toolbox, so I need to pull up those results through that toolbox: Batch > SPM > Tools > SwE > Results Display > SwE File: [my SwE.mat of interest] > Play button > Threshold accordingly [in this case at TFCE FWE < 0.05]. The results display will then pop up, showing the glass brain, design matrix, and results table for your selected contrast.

my SwE results; look at this table! I don’t want to retype all that info by hand!

Export the results table

It’s super easy to export the results table. All you need to do is right click somewhere inside the table area.

right click to see the options for exporting the results table

This right click gives you several options:

  • Print text table: prints the table text into your MATLAB command window (not the most useful, although I guess you could copy-paste this?)
  • Extract table data structure: creates a MATLAB structure with all of the data; depending on your end goal, this is useful. It contains all of the table information but also the text at the bottom detailing info about the thresholding used, model, contrast, number of subjects, etc.
  • Export to Excel: exports all of the table data — but not the text at the bottom — to an Excel file. This will likely be my preferred option. Then, you can copy-paste into a Word doc or format your table in Excel. That bottom information (thresholding, number of subjects, etc.) isn’t really necessary to export with the table, so I’m not upset that the Excel file lacks it. This is likely all info you’d put into the methods or figure legend anyhow, so you don’t really need it paired directly with the table.
  • Export to CSV: same as exporting to Excel, just get a CSV file instead.

View and edit the table in Excel

There you go! I selected Export to Excel. I now have the table in an Excel document, where I can copy to a Word doc or play with in Excel. Easy!

the SwE results table exported to Excel! super easy!

Categories:

Archives