M2 function

Compute the M2 model fit statistic