LeastSquaresRegressionResult other = new LeastSquaresRegressionResult(result); assertEquals(result, other); assertEquals(result.hashCode(), other.hashCode()); other = new LeastSquaresRegressionResult(betas, residuals, meanSquareError, standardErrorOfBeta, rSquared, rSquaredAdjusted, tStats, pValues, hasIntercept); assertEquals(result, other); assertEquals(result.hashCode(), other.hashCode()); final double[] x = new double[] {1.5, 2.5, 3.5 }; other = new LeastSquaresRegressionResult(x, residuals, meanSquareError, standardErrorOfBeta, rSquared, rSquaredAdjusted, tStats, pValues, hasIntercept);