SDMPSI Tutorial
SDMPSI Tutorial
The aim of this tutorial is to show how to conduct a meta-analysis using SDM-PSI software. To this end,
you will perform some of the analyses conducted in https://doi.org/10.1192/bjp.bp.108.055046.
Note however that these analyses will be conducted with the updated, SDM-PSI algorithms described in
https://doi.org/10.1016/j.neuroimage.2018.10.077, based on the previous works in http://dx.doi.org/10.1016/j.eurpsy.2011.04.001,
https://doi.org/10.3389/fpsyt.2014.00013 and https://10.42.0.1/10.1016/j.neuroimage.2018.04.065.
We distribute this tutorial in the hope that it will be useful, but without any warranty on the accuracy of
the text or the data.
We have invested a lot of time and effort to improve the accuracy of the SDM methods and software.
However, it may yield biased estimations if you not consider the following inclusion / exclusion criterion
for peaks when conducting the searches and contacts with the authors:
“While different studies may employ different thresholds, you should ensure that within one
study, the same threshold was used throughout the whole brain”
This is of utmost importance because it is not rare in neuroimaging studies that some regions (e.g., a
priori regions of interest) are more liberally thresholded than the rest of the brain.
Page 1 of 18
SDM-PSI tutorial version Jan 2019
SDM allows the combination of statistical maps (in NIfTI format, obtained from e.g., SPM or FSL
software) and peak information (e.g., reported in the papers). For this tutorial, we will only use peak
information, and for your convenience, the text files with this peak information have been already
prepared in the folder containing this PDF.
Look at the names and contents of these text files. Coordinates and t-values of the peaks are written in a
separate text file for each study, and the filename is just a very short identification of the study (e.g., the
name of the first author), plus a dot, plus an identification of the software used in the study and
stereotactic space of the peak coordinates, plus a dot, plus “txt”.
Carmona.spm_mni.txt
40,39,21,-5.14
53,27,21,-3.77
56,23,20,-3.63
...
Christian.no_peaks.txt
Each line specifies a coordinate and its t statistic. The coordinate is defined by the first three values
(e.g., “40, 39, 21”), and the t statistic by the forth value (e.g., “-5.14”). The extension of the first file is
*.spm_mni.txt, for what these coordinates are understood to be in SPM’s MNI space. The extension of
the second file is *.no_peaks.txt because that study reported no peaks.
Page 2 of 18
SDM-PSI tutorial version Jan 2019
Two-sample fMRI studies: patients > controls in task > baseline patients < controls in task > baseline
(hyper-activations) (hypo-activations)
patients < controls in task < baseline patients > controls in task < baseline
(failures of deactivation) (hyper-deactivations)
In a real meta-analysis, you would have to read carefully the original papers of the studies, and
sometimes you might notice that authors report z scores instead of t statistics. You may straightforwardly
convert z scores into t statistics using the online converter at https://www.sdmproject.com/utilities/?show=Statistics (you
may access this website pressing the [Convert peaks] button within the SDM software).
In case of studies not reporting any measure related to effect size (t statistic, z score, p value, etcetera),
you should write a “p” for positive peaks and an “n” for negative peaks. The SDM software conducts a
pre-analysis to provide an effect size for these peaks.
IMPORTANT: Statistical maps in a standard stereotactic are preferred to any peak information file. If
you are able to obtain these images, use the [Convert images] button within the SDM software to
prepare them for the analysis.
Page 3 of 18
SDM-PSI tutorial version Jan 2019
In this step, you should first specify a working folder for the meta-analysis, and afterwards create an
SDM table specifying at least the names of the studies and their sample sizes. We prepared the latter for
you in this tutorial.
IMPORTANT: To prevent errors, run SDM software from a local disk (rather than from a network drive).
Linux users: to start the software click a file named “SdmPsiGui” / “SdmPsiGui.desktop” in the
SDM software folder. If the program does not execute follow, the instructions to change file
permissions at https://www.sdmproject.com/software/?show=Linux
Mac OSX users: to start the software click a file named "SdmPsiGui" / “SdmPsiGui.app”. If the
program does not execute follow, the instructions to change file permissions at
https://www.sdmproject.com/software/?show=Mac
Windows users: to start the software click a file named “SdmPsiGui” / “SdmPsiGui.exe” in the
SDM software folder. If the program does not execute follow, the instructions to change file
permissions at https://www.sdmproject.com/software/?show=Windows
To specify the working folder for the meta-analysis, click the [Change meta-analysis] button, look for
the “home/tutorial” folder containing this PDF (within the SDM software folder), and click [Choose].
Page 4 of 18
SDM-PSI tutorial version Jan 2019
If SDM software did not found MRIcron, you can manually specify its location with the following
steps: open the [Tools] menu, select [Preferences], select the [Brain viewer] tab, and change the
[Brain viewer executable] (look for the MRIcron program, typically something like “C:\Program
Files\MRIcron\mricron.exe” in Windows). Then click [Open] and [OK].
To create or edit the SDM table, click the button [SDM table editor] button.
Page 5 of 18
SDM-PSI tutorial version Jan 2019
Each row in the SDM table specifies one study. In this example, the first column (“study”) sets the
identification of the study (the same than in the text files). The second and third columns specify the size
of the patients’ sample (“n1”) and of the controls’ sample (“n2”). The fourth column (“t_thr”) specifies the
t-value threshold of statistical significance used in each study, which you might sometimes find in the
manuscript or its figures (e.g. something such as "t > 4.3"). If you are unsure, a conservative option
might be typing the t-value corresponding to p=0.001 uncorrected (about 3.1, larger in smaller studies).
However, if authors applied cluster-based statistics, we suggest using the t-value threshold used to
create clusters, which may be <3.1.
The 5th-8th columns specify optional global gray matter values, and the 9th-10th columns optional
variables. You could also add a special optional column, called “threshold”, to specify the threshold type
(e.g., “uncorrected” vs “corrected”) used in each study. In case of meta-analyses that only involve
healthy controls, the second column (“n1”) should be the size of the samples, and you should not call
any column “n2”.
To change the directory, use the command “cd”. E.g., to follow this tutorial and assuming that your
SDM software folder is within your Documents folder, you should type something similar to:
cd Documents\sdm\home\tutorial (Windows)
Afterwards you should create or modify a text file named “sdm_table.txt” with the information of the
SDM table using any text or spreadsheet editor (the file has been already created for this tutorial, but
please open and inspect it). To open a text editor from the terminal you may type something similar to:
To minimize the risk of errors when SDM reads the file “sdm_table.txt”, do not type any character other
than numbers and simple letters (apart from the tabs to separate the columns).
Page 6 of 18
SDM-PSI tutorial version Jan 2019
“Globals” analysis
Prior to the voxel-based meta-analysis, you may want to conduct an analysis of the global gray matter
volumes. To this end, the following variables must be defined in the SDM table: “mean1” and “mean2”
(global gray matter means), and “sd1” and “sd2” (global gray matter standard deviations).
To conduct the “globals” analysis, click the button [Globals], and click [OK].
This will create and automatically open a web-like file named “globals_MyGlobals.htm” with standard
meta-analytic measures for global gray matter. The most important measures are the mean (Hedge’s g
along with its corresponding Z and P values and the confidence interval) and the analysis of
heterogeneity (τ and its corresponding Q and P values).
Page 7 of 18
SDM-PSI tutorial version Jan 2019
Pre-processing
In this step, SDM will use the peaks’ text files to voxelwise recreate the lower and upper bounds of the
possible effect-size values of the studies.
To pre-process the peaks, click the button [Preprocessing], select the [VBM - gray matter] modality,
and click [OK].
A web-like file named “pp.htm”, which the software will open automatically. You should check that
the absolute maximum and minimum peaks reported in the summary of “pp.htm” roughly
correspond to those reported in the original manuscripts. Pay special attention to check the side
(left vs. right).
Four “*.nii.gz” brain image files for each study: two for the lower and upper bounds of the possible
effect size and two for the lower and upper bound of the possible t-values.
A file for study settings named “sdmpsi_params.xml”, which may be useful for modifying some
parameters when working from the console. Please be aware that the integrity of this xml file is
Page 8 of 18
SDM-PSI tutorial version Jan 2019
required to SDM-PSI to be able to execute normally. Therefore, we strongly suggest the user to
manipulate this file with the utmost care.
A file stamping the preprocessing step as done ("sdm_maps.txt"). In absence of this file, the GUI
will require the user to perform the preprocessing step before running Mean or Linear Model
steps.
To pre-process using the gray matter correlation template, with full anisotropy (1.0) and 20mm FWHM,
within the gray matter mask and using a voxel size of 2mm, type the following:
sdm pp gray_matter,1.0,20,gray_matter,2
Important: here and in any subsequent call to SDM software you have to replace sdm by the path of
the SDM software, e.g.
Page 9 of 18
SDM-PSI tutorial version Jan 2019
Mean analysis
Now it is time to conduct the mean analysis, which is usually the main (but not the only!) outcome of a
meta-analysis. In this tutorial, the mean analysis represents the weighted mean difference in regional
grey matter between patients with OCD and healthy controls.
To conduct the mean analysis, click the button [Mean], specify a name for this analysis (we will call it
“MyMean”) and click [OK].
This will create a folder named “analysis_MyMean” with a folder for the multiple imputations (“mi”), a
folder for the beta coefficients ("betaMaps"), the mean map (“_g”) with its variance (“_var”) and z-value
(“_z”), and the between-study heterogeneity maps (τ2, H2, I2 and Q test). It will also create a folder
named "log" with internal files describing which kernel has been applied to each of the voxels in the
imputations process.
To correct for multiple comparisons, click the button [FWE correction], specify the number of CPU
threads to use, and click [OK].
We strongly suggest you to increase the number of CPU threads to use to a value close to the maximum
available on your machine (you can see this maximum value at the "preferences" dialog of SdmPsiGui).
However, one way or another, it will take a lot of time!
Page 10 of 18
SDM-PSI tutorial version Jan 2019
After a long, long time, it will finished. It will have created a folder for the distribution of the maximum
statistics (“fwe”) and the maps of corrected p-values (“corrp_*”).
To threshold and see the results, click the button [Threshold], select the map of TFCE-corrected
values and click [OK].
This will create and automatically open a web-like file named something like
“MyMean_z_p0.05000_10.htm” with several statistics, coordinates and brain regional breakdowns, and it
will start the MRIcron program to inspect visually them. In addition, it will create the following images:
To calculate the mean and threshold it using a p-value = 0.05, and 10 voxels extent, type the following
(at this point you may want to very carefully modify the file sdmpsi_params.xml and raise the number of
CPU threads to use, variable):
sdm MyMean=mi 50
sdm perm 1000,MyMean
sdm threshold analysis_MyMean/corrp_tfce,analysis_MyMean/MyMean_z,0.05,10
Page 11 of 18
SDM-PSI tutorial version Jan 2019
We strongly recommend extracting values from relevant peaks, inspecting the corresponding I2 statistics
(or other heterogeneity estimates) and check their funnel plots. You may also use extracted values to
create meta-regression plots with Microsoft Excel, R or similar software.
You should first create a mask that includes the voxel or region from where you want to extract the
values, and then extract these values using the mask. Fortunately, the “Thresholding” automatically
creates the masks for the peaks.
To create the mask, click the [Create a mask] button, select [MNI coordinate], click [OK], type the
coordinate (X = -24, Y = 10, Z = -2), and click [OK].
This will create a file named “analysis_MyMean/masks/mask_-24_10_-2.nii.gz” which contains the mask.
Note that you can copy this file to the folder of another meta-analysis in order to avoid creating it again.
Page 12 of 18
SDM-PSI tutorial version Jan 2019
To extract the values using this mask, click the [Extract] button, select model "MyMean", select “-
24_10_-2”, and click [OK].
This will create and automatically open a web-like file named “analysis_MyMean/extracts/extract_-
24_10_-2.htm” with the gray matter values of each map in this voxel. In addition, it will create a simple
text file for programming purposes.
To create the mask and extract the values, type the following:
To create a mask of an atlas’ structure, please use the codes at the end of this tutorial (which could
change in future versions of SDM!). E.g., to create a mask of the left anterior commissure and name it
“ac”, type the following:
Page 13 of 18
SDM-PSI tutorial version Jan 2019
This is similar to the mean analysis, with the exception that you will specify the “adults” filter in order that
only studies with adult samples are included in the analysis.
To conduct the subgroup analysis, click the button [Mean], specify a name for this analysis (we will
call it “myAdults”), select the “adults” filter, and click [OK].
To calculate the subgroup mean and threshold it, type the following:
Page 14 of 18
SDM-PSI tutorial version Jan 2019
Meta-regression by YBOCS
The last analysis of this tutorial will be a meta-regression of voxel values across the studies by the
YBOCS of the corresponding patients’ samples.
To conduct the regression analysis, click the button [Linear model], specify a name for this analysis
(e.g., “ybocs”), select “YBOCS” as the first variable, set its contrast value to “1” and click [OK].
This will create a new folder named "analysis_ybocs/" for the meta-regression by the YBOCS
variable. Run then the FWE correction and threshold the resulting maps.
To calculate the regression and threshold its output maps, type the following:
Page 15 of 18
SDM-PSI tutorial version Jan 2019
Page 16 of 18
SDM-PSI tutorial version Jan 2019
Page 17 of 18
SDM-PSI tutorial version Jan 2019
Page 18 of 18