Extend for multiple group and multiple factor analysis