- UNIX compatible system
- C libraries: blaswrap, f2c, clapack
Download source code package and accompanying publication here.
Unpack the archive in a directory of your choice. You will need the latest version of GNU GCC to compile the source code.
In order to compile the code, run the Makefile from inside the extracted directory with
The executable thereby created is named HPGRF.
Running the Code
$ ./HPGRF model.args
The executable expects as input argument a text file (here named model.args) which specifies the following parameters:
- dataname ... path and filename of point data; the format for each row must be: subject ID x- y- z-coord. group label (see example_pointdata.dat in the download for reference)
important: point locations must be transformed such that all of points are located in the first octant!
- savename ... name of output/results folder
- numOfJumps ... number of latent points of the gamma random field (must be larger than the number of points in the input data)
- totalIters ... total number of iterations for the MCMC chain
- burnin ... number of iterations during burn-in
- recStep ... number of iterations between consecutive draws from the posterior
- [a range of parameters for MCMC update functions] ... recommended: leave them as they are
- predict ... set to 1 if the program should perform prediction/classification
- preddataname ... path and filename of point data that should be classified; same format as input data
In addition, the program expects to find the following files in the same directory as the executable:
- brainmask.nii ... whole-brain mask
- Amygdala_L.nii / Amygdala_R.nii ... region-specifc masks; if a whole-brain analysis should be performed, copy the whole-brain mask into these two files (the files must still be named Amygdala_L.nii and Amygdala_R.nii)
The program will create the following output files:
- mean and SD of individual posterior intensities for each group/class in the input data
- mean and SD of shared, population-level intensity
- confusion matrix and classification probabilities based on LOOCV for the data specified for prediction
- parameter traces