UtilMeanSquares function

Calculate mean squares for factorial dataset