Skip to content
Code Supplement for "The Impact of Model Assumptions in Scalar-on-Image Regression"
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Code Supplement

This repository contains the code supplement for the paper

The Impact of Model Assumptions in Scalar-on-Image Regression

Clara Happ, Sonja Greven, Volker Schmid (Department of Statistics, LMU Munich, Munich, Germany)
for the Alzheimer's Disease Neuroimaging Initiative. Statistics in Medicine, 37(28): 4298-4317. The full article is available here.

It provides:

  • Usage examples for all models used in the paper
  • R implementations of methods, if not already available
  • R functions for all measures developed in the paper
  • ADNI roster IDs (RID) of the subjects used in the simulation settings (sample size 250 and 500) and in the application (sample size 754). We use slice z = 75 of each three-dimensional brain scan and select the coordinates x = 30:93, y = 30:93 to obtain the quadratic sub-images.
  • Code for generating the beta-images for the simulation, together with csv-files containing the final images (bumpy, pca, smooth, sparse)


R functions are directly applicable. The C implementation of the Bayesian GMRF models requires compilation. Change to the C subdirectory and run the following code in the command line (tested under Linux only)

  1. R CMD SHLIB utilities/*.c (compiles all utility functions)
  2. R CMD SHLIB mainGibbs_GMRF.c utilities/*.o (compiles main for GMRF)
  3. R CMD SHLIB mainGibbs_HyperparamsFixed.c utilities/*.o (compiles main for SparseGMRF)

Make sure that the Makevars file is in the same directory as the main files.

Bug reports

Please use GitHub issues for reporting bugs or issues.

You can’t perform that action at this time.