Hi Laurens,
May I suggest that you take a look at the SwE toolbox,
http://www.nisox.org/Software/SwE? SwE stands for sandwich estimator, and this is a common approach used in biostatistics that does not require a balanced design and, in particular, avoids having to use per-subject dummy variables that currently occupy all but one of your design matrix columns.
Where as SPM must assume a common repeated measures covariance over the brain, this allows any form of correlation at each voxel.
Also, on the issue of working with average data as Donald suggested, we evaluated that in our paper (Guillaume et al, 2014), and found that the heterogeneous variance from differing number of visits per subject can indeed corrupted the inference, leading to inflated false positive rates.
A few starting pointers: .With your small number of subjects, I'd recommend using "Homogeneous" SwE, where correlations are pooled over subjects; with, say, 50+ subjects you can use the "traditional" SwE which makes absolutely no assumptions on the form of the correlations. The parametric inference mode gives you uncorrected and FDR-corrected tables of results just like SPM. We have a nonparametric, Wild Bootstrap mode that gives you FWE voxel and cluster inference but we haven't implemented the results table yet (you just get -log10 P-value images that you can subsequently interrogate, but we're working on addressing that limitation.
Let me know if you have any problems/questions with it.
-Tom
- Guillaume, B., Hua, X., Thompson, P. M., Waldorp, L., & Nichols, T. E. (2014). Fast and accurate modelling of longitudinal and repeated measures neuroimaging data. NeuroImage, 94, 287–302. doi:10.1016/j.neuroimage.2014.03.029