ssq function

ssq a generalized function for summing squared residuals