/** * {@inheritDoc}<p> * This implementation uses the * {@link org.apache.commons.math.distribution.FDistribution * commons-math F Distribution implementation} to estimate the exact * p-value, using the formula<pre> * p = 1 - cumulativeProbability(F)</pre> * where <code>F</code> is the F value and <code>cumulativeProbability</code> * is the commons-math implementation of the F distribution.</p> * <p>True is returned iff the estimated p-value is less than alpha.</p> */ public boolean anovaTest(Collection categoryData, double alpha) throws IllegalArgumentException, MathException { if ((alpha <= 0) || (alpha > 0.5)) { throw new IllegalArgumentException("bad significance level: " + alpha); } return (anovaPValue(categoryData) < alpha); }
/** * {@inheritDoc}<p> * This implementation computes the F statistic using the definitional * formula<pre> * F = msbg/mswg</pre> * where<pre> * msbg = between group mean square * mswg = within group mean square</pre> * are as defined <a href="http://faculty.vassar.edu/lowry/ch13pt1.html"> * here</a></p> */ public double anovaFValue(Collection<double[]> categoryData) throws IllegalArgumentException, MathException { AnovaStats a = anovaStats(categoryData); return a.F; }
public IValue anovaPValue(IList categoryData){ try { return values.real(new OneWayAnovaImpl().anovaPValue(makeAnova(categoryData))); } catch (IllegalArgumentException e) { throw RuntimeExceptionFactory.illegalArgument(categoryData, null, null, e.getMessage()); } catch (MathException e) { throw RuntimeExceptionFactory.illegalArgument(categoryData, null, null, e.getMessage()); } }
public IValue anovaFValue(IList categoryData){ try { return values.real(new OneWayAnovaImpl().anovaFValue(makeAnova(categoryData))); } catch (IllegalArgumentException e) { throw RuntimeExceptionFactory.illegalArgument(categoryData, null, null, e.getMessage()); } catch (MathException e) { throw RuntimeExceptionFactory.illegalArgument(categoryData, null, null, e.getMessage()); } }
public IValue anovaTest(IList categoryData, INumber alpha){ try { return values.bool(new OneWayAnovaImpl().anovaTest(makeAnova(categoryData), alpha.toReal(values.getPrecision()).doubleValue())); } catch (IllegalArgumentException e) { throw RuntimeExceptionFactory.illegalArgument(categoryData, null, null, e.getMessage()); } catch (MathException e) { throw RuntimeExceptionFactory.illegalArgument(categoryData, null, null, e.getMessage()); } } }
/** * {@inheritDoc}<p> * This implementation computes the F statistic using the definitional * formula<pre> * F = msbg/mswg</pre> * where<pre> * msbg = between group mean square * mswg = within group mean square</pre> * are as defined <a href="http://faculty.vassar.edu/lowry/ch13pt1.html"> * here</a></p> */ public double anovaFValue(Collection<double[]> categoryData) throws IllegalArgumentException, MathException { AnovaStats a = anovaStats(categoryData); return a.F; }
/** * {@inheritDoc}<p> * This implementation uses the * {@link org.apache.commons.math.distribution.FDistribution * commons-math F Distribution implementation} to estimate the exact * p-value, using the formula<pre> * p = 1 - cumulativeProbability(F)</pre> * where <code>F</code> is the F value and <code>cumulativeProbability</code> * is the commons-math implementation of the F distribution.</p> * <p>True is returned iff the estimated p-value is less than alpha.</p> */ public boolean anovaTest(Collection<double[]> categoryData, double alpha) throws IllegalArgumentException, MathException { if ((alpha <= 0) || (alpha > 0.5)) { throw MathRuntimeException.createIllegalArgumentException( LocalizedFormats.OUT_OF_BOUND_SIGNIFICANCE_LEVEL, alpha, 0, 0.5); } return anovaPValue(categoryData) < alpha; }
/** * {@inheritDoc}<p> * This implementation computes the F statistic using the definitional * formula<pre> * F = msbg/mswg</pre> * where<pre> * msbg = between group mean square * mswg = within group mean square</pre> * are as defined <a href="http://faculty.vassar.edu/lowry/ch13pt1.html"> * here</a></p> */ public double anovaFValue(Collection categoryData) throws IllegalArgumentException, MathException { AnovaStats a = anovaStats(categoryData); return a.F; }
/** * {@inheritDoc}<p> * This implementation uses the * {@link org.apache.commons.math.distribution.FDistribution * commons-math F Distribution implementation} to estimate the exact * p-value, using the formula<pre> * p = 1 - cumulativeProbability(F)</pre> * where <code>F</code> is the F value and <code>cumulativeProbability</code> * is the commons-math implementation of the F distribution.</p> * <p>True is returned iff the estimated p-value is less than alpha.</p> */ public boolean anovaTest(Collection<double[]> categoryData, double alpha) throws IllegalArgumentException, MathException { if ((alpha <= 0) || (alpha > 0.5)) { throw MathRuntimeException.createIllegalArgumentException( "out of bounds significance level {0}, must be between {1} and {2}", alpha, 0, 0.5); } return anovaPValue(categoryData) < alpha; }
/** * {@inheritDoc}<p> * This implementation uses the * {@link org.apache.commons.math.distribution.FDistribution * commons-math F Distribution implementation} to estimate the exact * p-value, using the formula<pre> * p = 1 - cumulativeProbability(F)</pre> * where <code>F</code> is the F value and <code>cumulativeProbability</code> * is the commons-math implementation of the F distribution.</p> */ public double anovaPValue(Collection<double[]> categoryData) throws IllegalArgumentException, MathException { AnovaStats a = anovaStats(categoryData); FDistribution fdist = new FDistributionImpl(a.dfbg, a.dfwg); return 1.0 - fdist.cumulativeProbability(a.F); }
/** * {@inheritDoc}<p> * This implementation uses the * {@link org.apache.commons.math.distribution.FDistribution * commons-math F Distribution implementation} to estimate the exact * p-value, using the formula<pre> * p = 1 - cumulativeProbability(F)</pre> * where <code>F</code> is the F value and <code>cumulativeProbability</code> * is the commons-math implementation of the F distribution.</p> */ public double anovaPValue(Collection categoryData) throws IllegalArgumentException, MathException { AnovaStats a = anovaStats(categoryData); FDistribution fdist = new FDistributionImpl(a.dfbg, a.dfwg); return 1.0 - fdist.cumulativeProbability(a.F); }
/** * {@inheritDoc}<p> * This implementation uses the * {@link org.apache.commons.math.distribution.FDistribution * commons-math F Distribution implementation} to estimate the exact * p-value, using the formula<pre> * p = 1 - cumulativeProbability(F)</pre> * where <code>F</code> is the F value and <code>cumulativeProbability</code> * is the commons-math implementation of the F distribution.</p> */ public double anovaPValue(Collection<double[]> categoryData) throws IllegalArgumentException, MathException { AnovaStats a = anovaStats(categoryData); FDistribution fdist = new FDistributionImpl(a.dfbg, a.dfwg); return 1.0 - fdist.cumulativeProbability(a.F); }