Record Class SignificanceResult

java.lang.Object
java.lang.Record
dev.dokimos.core.comparison.SignificanceResult
Record Components:
method - test used ("mcnemar" or "permutation")
significant - true when pValue is below the configured alpha
ciLow - lower bound of the bootstrap CI, or null when not computed
ciHigh - upper bound of the bootstrap CI, or null when not computed

public record SignificanceResult(String method, double pValue, boolean significant, Double ciLow, Double ciHigh) extends Record
Outcome of a statistical significance test on a paired comparison.
  • Constructor Details

    • SignificanceResult

      public SignificanceResult(String method, double pValue, boolean significant, Double ciLow, Double ciHigh)
      Creates an instance of a SignificanceResult record class.
      Parameters:
      method - the value for the method record component
      pValue - the value for the pValue record component
      significant - the value for the significant record component
      ciLow - the value for the ciLow record component
      ciHigh - the value for the ciHigh record component
  • Method Details

    • notSignificant

      public static SignificanceResult notSignificant(String method)
      Non-significant placeholder with pValue = 1.0 and no confidence interval.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • method

      public String method()
      Returns the value of the method record component.
      Returns:
      the value of the method record component
    • pValue

      public double pValue()
      Returns the value of the pValue record component.
      Returns:
      the value of the pValue record component
    • significant

      public boolean significant()
      Returns the value of the significant record component.
      Returns:
      the value of the significant record component
    • ciLow

      public Double ciLow()
      Returns the value of the ciLow record component.
      Returns:
      the value of the ciLow record component
    • ciHigh

      public Double ciHigh()
      Returns the value of the ciHigh record component.
      Returns:
      the value of the ciHigh record component