Examples of TTestImpl


Examples of org.apache.commons.math.stat.inference.TTestImpl

    double s1[] = makeT(sample1);
    double s2[] = makeT(sample2);
    //for(int i = 0; i < s1.length; i++) System.err.println("s1[" + i + "] = " + s1[i]);
    //for(int i = 0; i < s2.length; i++) System.err.println("s2[" + i + "] = " + s2[i]);
    try {
      double r = new TTestImpl().tTest(s1, s2);
      //System.err.println("r = " + r);
      return values.real(r);
    } catch (IllegalArgumentException e) {
      throw RuntimeExceptionFactory.illegalArgument(sample1, null, null, e.getMessage());
    } catch (MathException e) {
View Full Code Here

Examples of org.apache.commons.math.stat.inference.TTestImpl

 
  public IValue tTest(IList sample1, IList sample2, INumber alpha){
    double s1[] = makeT(sample1);
    double s2[] = makeT(sample2);
    try {
      return values.bool(new TTestImpl().tTest(s1, s2, alpha.toReal().doubleValue()));
    } catch (IllegalArgumentException e) {
      throw RuntimeExceptionFactory.illegalArgument(sample1, null, null, e.getMessage());
    } catch (MathException e) {
      throw RuntimeExceptionFactory.illegalArgument(sample1, null, null, e.getMessage());
    }
View Full Code Here

Examples of org.apache.commons.math.stat.inference.TTestImpl

  }
 
  public IValue tTest(INumber mu, IList sample, INumber alpha){
    double s[] = makeT(sample);
    try {
      return values.bool(new TTestImpl().tTest( mu.toReal().doubleValue(), s, alpha.toReal().doubleValue()));
    } catch (IllegalArgumentException e) {
      throw RuntimeExceptionFactory.illegalArgument(sample, null, null, e.getMessage());
    } catch (MathException e) {
      throw RuntimeExceptionFactory.illegalArgument(sample, null, null, e.getMessage());
    }
View Full Code Here

Examples of org.apache.commons.math.stat.inference.TTestImpl

    return dataMatrix;
  }

  private String getPvalue(DescriptiveStatistics group1,
      DescriptiveStatistics group2) {
    TTestImpl ttest = new TTestImpl();
    String sig = "";
    try {
      double pValue = ttest.tTest(group1, group2);
      if (pValue < 0.05) {
        sig = "*";
      }
      if (pValue < 0.01) {
        sig = "**";
 
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.