Create an abstract type linearmixedmodel and move some methods there.