public class MultipleComparisonExperiment extends AbstractCloneableSerializable implements BlockExperimentComparison<java.lang.Number>, MultipleHypothesisComparison<java.util.Collection<? extends java.lang.Number>>
Modifier and Type | Class and Description |
---|---|
static class |
MultipleComparisonExperiment.Statistic
Result of running the MultipleHypothesisComparison hypothesis test
|
Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_ALPHA
Default alpha (p-value threshold), 0.05.
|
static BlockExperimentComparison<java.lang.Number> |
DEFAULT_BLOCK_EXPERIMENT_COMPARISON
Default block-experiment comparison, FriedmanConfidence.
|
static MultipleHypothesisComparison<java.util.Collection<? extends java.lang.Number>> |
DEFAULT_POST_HOC_TEST
Default post-host multiple hypothesis comparison test, NemenyiConfidence.
|
DEFAULT_UNCOMPENSATED_ALPHA
Constructor and Description |
---|
MultipleComparisonExperiment()
Creates a new instance of MultipleComparisonExperiment
|
MultipleComparisonExperiment(BlockExperimentComparison<java.lang.Number> blockExperimentComparison,
MultipleHypothesisComparison<java.util.Collection<? extends java.lang.Number>> postHocTest,
double alpha)
Creates a new instance of MultipleComparisonExperiment
|
Modifier and Type | Method and Description |
---|---|
MultipleComparisonExperiment |
clone()
This makes public the clone method on the
Object class and
removes the exception that it throws. |
MultipleComparisonExperiment.Statistic |
evaluateNullHypotheses(java.util.Collection<? extends java.util.Collection<? extends java.lang.Number>> data)
Evaluates the null hypotheses associated with the given collection
of data.
|
MultipleComparisonExperiment.Statistic |
evaluateNullHypotheses(java.util.Collection<? extends java.util.Collection<? extends java.lang.Number>> data,
double uncompensatedAlpha)
Evaluates the null hypotheses associated with the given collection
of data.
|
MultipleComparisonExperiment.Statistic |
evaluateNullHypothesis(java.util.Collection<? extends java.util.Collection<? extends java.lang.Number>> treatments)
Evaluates the null hypothesis for the given block-design treatments
|
MultipleComparisonExperiment.Statistic |
evaluateNullHypothesis(java.util.Collection<? extends java.lang.Number> data1,
java.util.Collection<? extends java.lang.Number> data2)
Computes the probability that two data were generated by
the same distribution.
|
double |
getAlpha()
Getter for alpha
|
BlockExperimentComparison<java.lang.Number> |
getBlockExperimentComparison()
Getter for blockExperimentComparison
|
MultipleHypothesisComparison<java.util.Collection<? extends java.lang.Number>> |
getPostHocTest()
Getter for postHocTest
|
void |
setAlpha(double alpha)
Setter for alpha
|
void |
setBlockExperimentComparison(BlockExperimentComparison<java.lang.Number> blockExperimentComparison)
Setter for blockExperimentComparison
|
void |
setPostHocTest(MultipleHypothesisComparison<java.util.Collection<? extends java.lang.Number>> postHocTest)
Setter for postHocTest
|
public static final BlockExperimentComparison<java.lang.Number> DEFAULT_BLOCK_EXPERIMENT_COMPARISON
public static final MultipleHypothesisComparison<java.util.Collection<? extends java.lang.Number>> DEFAULT_POST_HOC_TEST
public static final double DEFAULT_ALPHA
public MultipleComparisonExperiment()
public MultipleComparisonExperiment(BlockExperimentComparison<java.lang.Number> blockExperimentComparison, MultipleHypothesisComparison<java.util.Collection<? extends java.lang.Number>> postHocTest, double alpha)
blockExperimentComparison
- Block-experiment comparison test that determines if there is a
statistically significant difference in one of the treatmentspostHocTest
- Post-hoc test that determines which treatments are statistically
significantly differentalpha
- P-value threshold, such that if the null-hypothesis probability is below
alpha then we reject the null hypothesis.public MultipleComparisonExperiment clone()
AbstractCloneableSerializable
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.clone
in interface CloneableSerializable
clone
in class AbstractCloneableSerializable
public BlockExperimentComparison<java.lang.Number> getBlockExperimentComparison()
public void setBlockExperimentComparison(BlockExperimentComparison<java.lang.Number> blockExperimentComparison)
blockExperimentComparison
- Block-experiment comparison test that determines if there is a
statistically significant difference in one of the treatmentspublic MultipleHypothesisComparison<java.util.Collection<? extends java.lang.Number>> getPostHocTest()
public void setPostHocTest(MultipleHypothesisComparison<java.util.Collection<? extends java.lang.Number>> postHocTest)
postHocTest
- Post-hoc test that determines which treatments are statistically
significantly differentpublic double getAlpha()
public void setAlpha(double alpha)
alpha
- P-value threshold, such that if the null-hypothesis probability is below
alpha then we reject the null hypothesis.public MultipleComparisonExperiment.Statistic evaluateNullHypothesis(java.util.Collection<? extends java.util.Collection<? extends java.lang.Number>> treatments)
BlockExperimentComparison
evaluateNullHypothesis
in interface BlockExperimentComparison<java.lang.Number>
treatments
- Collection of treatments for the block-design experiment, where each
treatment containspublic MultipleComparisonExperiment.Statistic evaluateNullHypothesis(java.util.Collection<? extends java.lang.Number> data1, java.util.Collection<? extends java.lang.Number> data2)
NullHypothesisEvaluator
evaluateNullHypothesis
in interface NullHypothesisEvaluator<java.util.Collection<? extends java.lang.Number>>
data1
- First dataset to considerdata2
- Second dataset to considerpublic MultipleComparisonExperiment.Statistic evaluateNullHypotheses(java.util.Collection<? extends java.util.Collection<? extends java.lang.Number>> data)
MultipleHypothesisComparison
evaluateNullHypotheses
in interface MultipleHypothesisComparison<java.util.Collection<? extends java.lang.Number>>
data
- Data from each treatment to considerpublic MultipleComparisonExperiment.Statistic evaluateNullHypotheses(java.util.Collection<? extends java.util.Collection<? extends java.lang.Number>> data, double uncompensatedAlpha)
MultipleHypothesisComparison
evaluateNullHypotheses
in interface MultipleHypothesisComparison<java.util.Collection<? extends java.lang.Number>>
data
- Data from each treatment to consideruncompensatedAlpha
- Uncompensated alpha (p-value threshold) for the multiple comparison
test, must be [0,1]