Class LogLogistic

    • Constructor Detail

      • LogLogistic

        public LogLogistic​(double shape,
                           double scale)
        Parameters:
        shape - the shape parameter
        scale - the scale parameter
      • LogLogistic

        public LogLogistic​(double[] parameters)
        Parameters:
        parameters - the parameter array parameter[0] = shape, parameter[1] = scale
      • LogLogistic

        public LogLogistic​(double shape,
                           double scale,
                           java.lang.String name)
        Parameters:
        shape - the shape parameter
        scale - the scale parameter
        name - an optional label/name
    • Method Detail

      • setShape

        public final void setShape​(double shape)
        Sets the shape parameter
        Parameters:
        shape - The shape parameter must > 0.0
      • setScale

        public final void setScale​(double scale)
        Sets the scale parameter
        Parameters:
        scale - The scale parameter must be > 0.0
      • getShape

        public final double getShape()
        Gets the shape
        Returns:
        The shape parameter as a double
      • getScale

        public final double getScale()
        Gets the scale parameter
        Returns:
        The scale parameter as a double
      • pdf

        public final double pdf​(double x)
        Description copied from interface: PDFIfc
        Returns the f(x) where f represents the probability density function for the distribution. Note this is not a probability.
        Specified by:
        pdf in interface PDFIfc
        Parameters:
        x - a double representing the value to be evaluated
        Returns:
        f(x)
      • cdf

        public final double cdf​(double x)
        Description copied from interface: CDFIfc
        Returns the F(x) = Pr{X <= x} where F represents the cumulative distribution function
        Specified by:
        cdf in interface CDFIfc
        Parameters:
        x - a double representing the upper limit
        Returns:
        a double representing the probability
      • getMean

        public final double getMean()
        Description copied from interface: MeanIfc
        Returns the mean or expected value of a distribution
        Specified by:
        getMean in interface MeanIfc
        Returns:
        double the mean or expected value for the distribution
      • getVariance

        public final double getVariance()
        Description copied from interface: VarianceIfc
        Returns the variance of the distribution if defined
        Specified by:
        getVariance in interface VarianceIfc
        Returns:
        double the variance of the random variable
      • invCDF

        public final double invCDF​(double p)
        Description copied from interface: InverseCDFIfc
        Provides the inverse cumulative distribution function for the distribution While closed form solutions for the inverse cdf may not exist, numerical search methods can be used to solve F(X) = U.
        Specified by:
        invCDF in interface InverseCDFIfc
        Parameters:
        p - The probability to be evaluated for the inverse, p must be [0,1] or an IllegalArgumentException is thrown
        Returns:
        The inverse cdf evaluated at the supplied probability
      • setParameters

        public final void setParameters​(double[] parameters)
        Sets the parameters for the distribution with shape = parameters[0] and scale = parameters[1]
        Specified by:
        setParameters in interface ParametersIfc
        Parameters:
        parameters - an array of doubles representing the parameters for the distribution
      • getParameters

        public final double[] getParameters()
        Gets the parameters for the distribution
        Specified by:
        getParameters in interface ParametersIfc
        Returns:
        Returns an array of the parameters for the distribution
      • main

        public static void main​(java.lang.String[] args)
        Parameters:
        args -