Documentation of 'jdistlib.Spearman' Java class
Spearman
jdistlib

Class Spearman

    • Constructor Detail

      • Spearman

        public Spearman(int n)
    • Method Detail

      • cumulative

        public static final double cumulative(double is,
                                              int n,
                                              boolean lower_tail)
        Spearman exact cumulative distribution function for n <= 22. For n > 22, cumulative_as89 is invoked. Taken from pspearman package.
        Parameters:
        is -
        n -
        lower_tail -
        Returns:
        CDF
      • cumulative_as89

        public static final double cumulative_as89(double is,
                                                   int n,
                                                   boolean lower_tail)
        Spearman cumulative distribution. (taken from src/library/stats/src/prho.c) Algorithm AS89 -- actually an approximation
        Parameters:
        is -
        n -
        lower_tail -
        Returns:
        CDF
      • cumulative_t

        public static final double cumulative_t(double is,
                                                int n,
                                                boolean lower_tail)
        Spearman cumulative distribution function, approximation using T (df=n-2)
        Parameters:
        is -
        n -
        lower_tail -
        Returns:
        CDF
      • density

        public static final double density(double is,
                                           int n)
        Density. Minimally tested! Implemented as a differential, i.e. (f(x+h) - f(x)) / h
        Parameters:
        is -
        n -
        Returns:
        density value
      • quantile

        public static final double quantile(double q,
                                            int n,
                                            boolean lower_tail,
                                            boolean log_p)
        Uses bisection.
        Parameters:
        q -
        n -
        lower_tail -
        log_p -
        Returns:
        quantile value
      • random

        public static final double random(int n,
                                          RandomEngine random)
        Inverse CDF lookup
        Parameters:
        n -
        random -
        Returns:
        random variate
      • random

        public static final double[] random(int count,
                                            int n,
                                            RandomEngine random)
      • density

        public double density(double x,
                              boolean log)
        Density. Minimally tested!
        Specified by:
        density in class GenericDistribution
        Parameters:
        x -
        log - set true for log
        Returns:
        density value
      • quantile

        public double quantile(double q,
                               boolean lower_tail,
                               boolean log_p)
        Uses numerical optimization to get approximate value, then followed by manual search.
        Specified by:
        quantile in class GenericDistribution
        Parameters:
        q -
        lower_tail -
        log_p - Whether q is in log value
        Returns:
        quantile value
      • random

        public double random()
        Inverse CDF lookup
        Specified by:
        random in class GenericDistribution
        Returns:
        random variate
      • main

        public static final void main(java.lang.String[] args)

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.