gov.sandia.cognition.statistics.method
Class HolmCorrection

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.statistics.method.AbstractMultipleHypothesisComparison<Collection<? extends Number>,StatisticType>
          extended by gov.sandia.cognition.statistics.method.AbstractPairwiseMultipleHypothesisComparison<HolmCorrection.Statistic>
              extended by gov.sandia.cognition.statistics.method.HolmCorrection
All Implemented Interfaces:
MultipleHypothesisComparison<Collection<? extends Number>>, CloneableSerializable, Serializable, Cloneable

@PublicationReference(author="Wikipedia",
                      title="Holm\u2013Bonferroni method",
                      type=WebPage,
                      url="http://en.wikipedia.org/wiki/Holm%E2%80%93Bonferroni_method",
                      year=2011)
public class HolmCorrection
extends AbstractPairwiseMultipleHypothesisComparison<HolmCorrection.Statistic>

The Holm correction is a uniformly tighter bound than the Bonferroni/Sidak correction by first sorting the pair-wide p-values and then adjusting the p-values by the number of remaining hypotheses. To reject the first p-value, the smallest pair-wise p-value must be smaller than the Bonferroni corrected value (alpha/N), then the next smallest p-value must be smaller than (alpha/(N-1)) and so forth. This is a uniformly looser bound than the Shaffer static correction. However, the computational complexity of the Holm algorithm is quadratic in the number of treatments, meaning its linear in the number of actual comparisons. So, for treatments above 100 (4950 comparisons), the Holm correction may be the most appropriate choice. This implementation uses the slightly tighter Sidak correction, as opposed to the standard Bonferroni correction.

Since:
3.3.0
Author:
Kevin R. Dixon
See Also:
Serialized Form

Nested Class Summary
static class HolmCorrection.Statistic
          Test statistic from the Shaffer static multiple-comparison test
 
Field Summary
 
Fields inherited from class gov.sandia.cognition.statistics.method.AbstractPairwiseMultipleHypothesisComparison
DEFAULT_PAIRWISE_TEST, pairwiseTest
 
Fields inherited from interface gov.sandia.cognition.statistics.method.MultipleHypothesisComparison
DEFAULT_UNCOMPENSATED_ALPHA
 
Constructor Summary
HolmCorrection()
          Default constructor
HolmCorrection(NullHypothesisEvaluator<Collection<? extends Number>> pairwiseTest)
          Creates a new instance of BonferroniCorrection
 
Method Summary
 HolmCorrection clone()
          This makes public the clone method on the Object class and removes the exception that it throws.
 HolmCorrection.Statistic evaluateNullHypotheses(Collection<? extends Collection<? extends Number>> data, double uncompensatedAlpha)
          Evaluates the null hypotheses associated with the given collection of data.
 
Methods inherited from class gov.sandia.cognition.statistics.method.AbstractPairwiseMultipleHypothesisComparison
getPairwiseTest, setPairwiseTest
 
Methods inherited from class gov.sandia.cognition.statistics.method.AbstractMultipleHypothesisComparison
evaluateNullHypotheses
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HolmCorrection

public HolmCorrection()
Default constructor


HolmCorrection

public HolmCorrection(NullHypothesisEvaluator<Collection<? extends Number>> pairwiseTest)
Creates a new instance of BonferroniCorrection

Parameters:
pairwiseTest - Confidence test used for pair-wise null-hypothesis tests.
Method Detail

clone

public HolmCorrection clone()
Description copied from class: AbstractCloneableSerializable
This makes public the clone method on the Object class and removes the exception that it throws. Its default behavior is to automatically create a clone of the exact type of object that the clone is called on and to copy all primitives but to keep all references, which means it is a shallow copy. Extensions of this class may want to override this method (but call super.clone() to implement a "smart copy". That is, to target the most common use case for creating a copy of the object. Because of the default behavior being a shallow copy, extending classes only need to handle fields that need to have a deeper copy (or those that need to be reset). Some of the methods in ObjectUtil may be helpful in implementing a custom clone method. Note: The contract of this method is that you must use super.clone() as the basis for your implementation.

Specified by:
clone in interface CloneableSerializable
Overrides:
clone in class AbstractPairwiseMultipleHypothesisComparison<HolmCorrection.Statistic>
Returns:
A clone of this object.

evaluateNullHypotheses

public HolmCorrection.Statistic evaluateNullHypotheses(Collection<? extends Collection<? extends Number>> data,
                                                       double uncompensatedAlpha)
Description copied from interface: MultipleHypothesisComparison
Evaluates the null hypotheses associated with the given collection of data.

Specified by:
evaluateNullHypotheses in interface MultipleHypothesisComparison<Collection<? extends Number>>
Specified by:
evaluateNullHypotheses in class AbstractMultipleHypothesisComparison<Collection<? extends Number>,HolmCorrection.Statistic>
Parameters:
data - Data from each treatment to consider
uncompensatedAlpha - Uncompensated alpha (p-value threshold) for the multiple comparison test, must be [0,1]
Returns:
Statistic that summarizes the multiple comparison test