Documentation of 'org.statcato.statistics.inferential.nonparametrics.SignTest' Java class
SignTest
org.statcato.statistics.inferential.nonparametrics

Class SignTest



  • public class SignTest
    extends java.lang.Object
    Sign test. Determines the likelihood of observing a specified number of observations above and below the hypothesized median.
    Since:
    1.0
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static int GREATER
      Alternative hypothesis type: greater than
      static int LESS
      Alternative hypothesis type: less than
      static int NOTEQUAL
      Alternative hypothesis type: not equal to
      static int THRESHOLD
      Sample size threshold for for normal approximation to binomial
    • Constructor Summary

      Constructors 
      Constructor and Description
      SignTest(int numPositive, int numNegative, double testMedian, int testType)
      Constructor, given summary data.
      SignTest(java.util.Vector<java.lang.Double> data, double testMedian, int testType)
      Constructor, given data values.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      double pValue()
      Returns the p-value.
      java.lang.String toString() 
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • LESS

        public static int LESS
        Alternative hypothesis type: less than
      • GREATER

        public static int GREATER
        Alternative hypothesis type: greater than
      • NOTEQUAL

        public static int NOTEQUAL
        Alternative hypothesis type: not equal to
      • THRESHOLD

        public static int THRESHOLD
        Sample size threshold for for normal approximation to binomial
    • Constructor Detail

      • SignTest

        public SignTest(int numPositive,
                        int numNegative,
                        double testMedian,
                        int testType)
        Constructor, given summary data.
        Parameters:
        numPositive - number of positive signs
        numNegative - number of negative signs
        testMedian - hypothesized median
        testType - type of alternative hypothesis
      • SignTest

        public SignTest(java.util.Vector<java.lang.Double> data,
                        double testMedian,
                        int testType)
        Constructor, given data values.
        Parameters:
        data - vector of double data values
        testMedian - hypothesized median
        testType - type of alternative hypothesis
    • Method Detail

      • pValue

        public double pValue()
        Returns the p-value. Uses the exact binomial probabilities if if the sample size (excluding sample equal to the hypothesized median) is less than or equal to the sample size threshold; otherwise, uses normal approximation to binomial.
        Returns:
        p-value
        See Also:
        THRESHOLD
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.