Please reuse (and improve) algorithms/statistics/mixed_effects_stats instead of duplicating it. (the name is actually better suited since this module is not one that handles generic mixed effects model).