Package jdistlib

Class Gompertz


public class Gompertz extends GenericDistribution
Gompertz distribution with shape and rate parameters.

This follows the unrestricted-shape parameterization used by the GPL-2-or-later flexsurv package. A zero shape is exponential with the supplied rate. A negative shape gives a defective distribution whose remaining probability is concentrated at positive infinity; quantiles and random draws return positive infinity for that component.

  • Constructor Details

    • Gompertz

      public Gompertz(double shape, double rate)
  • Method Details

    • density

      public static double density(double x, double shape, double rate, boolean giveLog)
    • cumulative

      public static double cumulative(double x, double shape, double rate, boolean lowerTail, boolean logP)
    • quantile

      public static double quantile(double p, double shape, double rate, boolean lowerTail, boolean logP)
    • random

      public static double random(double shape, double rate, RandomEngine random)
    • random

      public static double[] random(int n, double shape, double rate, RandomEngine random)
    • hazard

      public static double hazard(double x, double shape, double rate, boolean giveLog)
      Returns the hazard rate * exp(shape * x).
    • cumulativeHazard

      public static double cumulativeHazard(double x, double shape, double rate, boolean giveLog)
      Returns the cumulative hazard.
    • density

      public double density(double x, boolean log)
      Specified by:
      density in class GenericDistribution
    • cumulative

      public double cumulative(double x, boolean lowerTail, boolean logP)
      Specified by:
      cumulative in class GenericDistribution
    • quantile

      public double quantile(double p, boolean lowerTail, boolean logP)
      Specified by:
      quantile in class GenericDistribution
    • random

      public double random()
      Specified by:
      random in class GenericDistribution