SSQ function

Sum of squared error