Made (mostly) compatible with lme models; sent beta version to Jason Rohr