Addition of general mixed model code for incorporation into cr models