Speeding up a hierarchical nonlinear model

Finally got around to doing this: Tip for speeding up models with repeated observations