Package org.apache.commons.math.distribution

Examples of org.apache.commons.math.distribution.ContinuousDistribution.cumulativeProbability()


    final ContinuousDistribution studentT = new TDistributionImpl(n - k);
    for (int i = 0; i < k; i++) {
      standardErrorsOfBeta[i] = Math.sqrt(meanSquareError * covarianceBetas[i][i]);
      tStats[i] = betas[i] / standardErrorsOfBeta[i];
      try {
        pValues[i] = 1 - studentT.cumulativeProbability(Math.abs(tStats[i]));
      } catch (final org.apache.commons.math.MathException e) {
        throw new com.opengamma.analytics.math.MathException(e);
      }
    }
    return new WeightedLeastSquaresRegressionResult(betas, residuals, meanSquareError, standardErrorsOfBeta, rSquared, adjustedRSquared, tStats, pValues,
View Full Code Here


    // StudentTDistribution(n - k);
    for (int i = 0; i < k; i++) {
      stdErrorBetas[i] = Math.sqrt(meanSquareError * covarianceBetas[i][i]);
      tStats[i] = betas[i] / stdErrorBetas[i];
      try {
        pValues[i] = 1 - studentT.cumulativeProbability(Math.abs(tStats[i]));
      } catch (final org.apache.commons.math.MathException e) {
        throw new com.opengamma.analytics.math.MathException(e);
      }
    }
    return new LeastSquaresRegressionResult(betas, residuals, meanSquareError, stdErrorBetas, rSquared, adjustedRSquared, tStats, pValues, useIntercept);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.