/**
  * Returns the sum of squared deviations of Y from its mean.
  *
  * <p>If the model has no intercept term, <code>0</code> is used for the mean of Y - i.e., what is
  * returned is the sum of the squared Y values.
  *
  * <p>The value returned by this method is the SSTO value used in the {@link #calculateRSquared()
  * R-squared} computation.
  *
  * @return SSTO - the total sum of squares
  * @see #isNoIntercept()
  * @since 2.2
  */
 public double calculateTotalSumOfSquares() {
   if (isNoIntercept()) {
     return StatUtils.sumSq(Y.getData());
   } else {
     return new SecondMoment().evaluate(Y.getData());
   }
 }
 /**
  * Returns the sum of squared deviations of Y from its mean.
  *
  * @return total sum of squares
  */
 public double calculateTotalSumOfSquares() {
   return new SecondMoment().evaluate(Y.getData());
 }