Note that The MLE for this mixed effects model has been implemented (actually twice).
See nipy.algorithms.statistics.mixed_effects_stat.py