gov.sandia.cognition.statistics.method
Class NemenyiConfidence.Statistic

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.statistics.method.AbstractMultipleHypothesisComparison.Statistic
          extended by gov.sandia.cognition.statistics.method.NemenyiConfidence.Statistic
All Implemented Interfaces:
MultipleHypothesisComparison.Statistic, CloneableSerializable, Serializable, Cloneable
Enclosing class:
NemenyiConfidence

public static class NemenyiConfidence.Statistic
extends AbstractMultipleHypothesisComparison.Statistic

Statistic from Nemenyi's multiple comparison test

See Also:
Serialized Form

Field Summary
 
Fields inherited from class gov.sandia.cognition.statistics.method.AbstractMultipleHypothesisComparison.Statistic
nullHypothesisProbabilities, testStatistics, treatmentCount, uncompensatedAlpha
 
Constructor Summary
NemenyiConfidence.Statistic(double uncompensatedAlpha, int subjectCount, ArrayList<Double> treatmentRankMeans, double standardError)
          Creates a new instance of StudentizedMultipleComparisonStatistic
 
Method Summary
 boolean acceptNullHypothesis(int i, int j)
          Determines if the (i,j) null hypothesis should be accepted (true) or rejected (false) .
 NemenyiConfidence.Statistic clone()
          This makes public the clone method on the Object class and removes the exception that it throws.
protected  Matrix computeNullHypothesisProbabilities(int subjectCount, Matrix Z)
          Computes null-hypothesis probability for the (i,j) treatment comparison
 Matrix computeTestStatistics(int subjectCount, ArrayList<Double> treatmentRankMeans, double standardError)
          Computes the test statistic for all treatments
 double getStandardError()
          Getter for standardError
 int getSubjectCount()
          Getter for subjectCount
 ArrayList<Double> getTreatmentMeans()
          Getter for treatmentRankMeans
 
Methods inherited from class gov.sandia.cognition.statistics.method.AbstractMultipleHypothesisComparison.Statistic
getNullHypothesisProbability, getTestStatistic, getTreatmentCount, getUncompensatedAlpha, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NemenyiConfidence.Statistic

public NemenyiConfidence.Statistic(double uncompensatedAlpha,
                                   int subjectCount,
                                   ArrayList<Double> treatmentRankMeans,
                                   double standardError)
Creates a new instance of StudentizedMultipleComparisonStatistic

Parameters:
uncompensatedAlpha - Uncompensated alpha (p-value threshold) for the multiple comparison test
subjectCount - Number of subjects in each treatment
treatmentRankMeans - Mean for each treatment
standardError - Standard error of the entire experiment
Method Detail

computeTestStatistics

public Matrix computeTestStatistics(int subjectCount,
                                    ArrayList<Double> treatmentRankMeans,
                                    double standardError)
Computes the test statistic for all treatments

Parameters:
subjectCount - Number of subjects in each treatment
treatmentRankMeans - Mean for each treatment
standardError - Standard error of the entire experiment
Returns:
Test statistics, where the (i,j) element compares treatment "i" to treatment "j", the statistic is symmetric

computeNullHypothesisProbabilities

protected Matrix computeNullHypothesisProbabilities(int subjectCount,
                                                    Matrix Z)
Computes null-hypothesis probability for the (i,j) treatment comparison

Parameters:
subjectCount - Number of subjects in the experiment
Z - Test statistic for the (i,j) treatment comparison
Returns:
Null-hypothesis probability for the (i,j) treatment comparison

clone

public NemenyiConfidence.Statistic 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 AbstractMultipleHypothesisComparison.Statistic
Returns:
A clone of this object.

getSubjectCount

public int getSubjectCount()
Getter for subjectCount

Returns:
Number of subjects in the experiment

getStandardError

public double getStandardError()
Getter for standardError

Returns:
Standard error of the entire experiment

getTreatmentMeans

public ArrayList<Double> getTreatmentMeans()
Getter for treatmentRankMeans

Returns:
Mean for each treatment

acceptNullHypothesis

public boolean acceptNullHypothesis(int i,
                                    int j)
Description copied from interface: MultipleHypothesisComparison.Statistic
Determines if the (i,j) null hypothesis should be accepted (true) or rejected (false) . Rejecting a null hypothesis typically means that there is a significant difference between the (i,j) treatment.

Parameters:
i - First treatment index
j - Second treatment index
Returns:
True if we accept the null hypothesis, false if we reject the null hypothesis