Multivariate statistical analysis of diffusion imaging parameters using partial least squares: Applications to white matter variations in Alzheimer's disease

Ender Konukoglu, Jean-Philippe Coutu, David H. Salat and Bruce Fischl, Neuroimage 2016 134:573-586

This page describes the software tool released as a part of the article published in Neuroimage (doi:10.1016/j.neuroimage.2016.04.038) . The tool is written in python and can be used on different platforms. We have tested the tool in Linux (CentOS 6.7) and Mac OS (Yosemite).


The software requires basic installation of numpy and scipy. In addition to these it also requires nibabel ( to be able to read/write Nifti images.

The most convenient way to use to tool is to set up a python environment using one of the available scientific environments such as:

Once one of these environments is set up, you can install nibabel simply by executing the command:

on a terminal.


After setting up the python environment you can set up the tool by downloading the tar-ball and extracting it in a directory of your choice.

The tar-ball contains the following:

The python files contain the tool itself. The run_dev.csh file provides example terminal commands on how to run the different types of analysis using the example data provided in the example_data folder. example_output folder is the typical outputs one can expect to get by running the commands in run_dev.csh file.


The article presents three different types of analysis which can all be run using the software tool described here. The different types of analyses and the corresponding sections in the articel are:

  1. Multivariate group analysis (Section 2.2)
  2. Comparing multivariate effect types of different conditions (Section 2.4)
  3. Regressing out nuissance parameters in the multivariate setting (Section 2.5)

The basic command to get help on how to run the tool is


Basic usage with the the available options are:

Different options are:


We will demonstrate the software tool for different analysis using the data provided in example_data folder. This folder contains a sample dataset used in the synthetic experiments presented in the supplementary material to the main article. The folder contains

Multivariate Group Analysis for Group Differences

The first analysis is to detect group differences between controls (label = 0) and disease (label = 1). We run the following code to perform this analysis:

Notice that this command performs TFCE enhancement and FDR correction for multiple comparisons problem. The outputs of this analysis are saved in the example_output folder with the prefix group_comparison_:

The data_info.txt file is saved to keep the information necessary to convert the results to images (shape of the multidimensional array). Below we show the output images for effect strength, thresholded p-value maps and the three components of the effect-types:

Multivariate Group Analysis for Aging Effects

The tool can also be used to perform group analysis for continuous variables. Here we provide an example for the aging analysis. We run the following command to perform the analysis:

Notice that this time the output type is given as binary hence the output files are written in binary. To read the binary files one can use the following steps in python for reading the vectors:

  1. import numpy as np
  2. fid = open('example_output/continuous_value_vectors_th.dat', 'r')
  3. V = np.fromfile(fid)
  4. fid.close()

The outputs of this analysis are:

Regressing out nuissance parameters in the multivariate setting

The tool allows using the method explained in Section 2.5 of the main article. For the example data we run the following code:

This analysis regresses out the effects of age - as given in the ages.txt file - and then computes group differences between label = 0 and label = 1 groups. The group differences are given both for the "parallel component" and the "orthogonal component". We see that this time the p-value threshold is set to 1.3 which corresponds to p < 0.05.

The structures of the files are similar to previous examples. We observe that there is no effect type results for the parallel component as this is unnecessary. The thresholded p value maps for the parallel and orthogonal components are as shown below:

Comparing effect types between two conditions

The last example shows how to use the software to compare multivariate effect types between two conditions. The conditions are indicated in the label.txt file as label=0 - controls, label = 1 condition 1 and label=2 condition 2. We run the following command to perform the analysis:

Notice the extra variable -rth which sets the regional threshold described previously and also in the main article. The outputs of this analysis are:

Both results are given below as images. First the p value maps and then the thresholded maps at pth = 2:

MultivariateStatisticalAnalysisDMRI (last edited 2016-05-10 12:42:21 by EnderKonukoglu)