Package jdistlib
Class Gompertz
java.lang.Object
jdistlib.generic.GenericDistribution
jdistlib.Gompertz
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.
-
Field Summary
Fields inherited from class jdistlib.generic.GenericDistribution
random -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublecumulative(double x, boolean lowerTail, boolean logP) static doublecumulative(double x, double shape, double rate, boolean lowerTail, boolean logP) static doublecumulativeHazard(double x, double shape, double rate, boolean giveLog) Returns the cumulative hazard.doubledensity(double x, boolean log) static doubledensity(double x, double shape, double rate, boolean giveLog) static doublehazard(double x, double shape, double rate, boolean giveLog) Returns the hazardrate * exp(shape * x).doublequantile(double p, boolean lowerTail, boolean logP) static doublequantile(double p, double shape, double rate, boolean lowerTail, boolean logP) doublerandom()static doublerandom(double shape, double rate, RandomEngine random) static double[]random(int n, double shape, double rate, RandomEngine random) Methods inherited from class jdistlib.generic.GenericDistribution
copyBackward, cumulative, cumulative, cumulative, cumulative_hazard, cumulative_hazard, cumulativeInto, density, density, densityInto, getRandomEngine, hazard, hazard, inverse_survival, inverse_survival, quantile, quantile, quantile, quantileInto, random, random, randomInto, setRandomEngine, survival, survival, survival
-
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
-
random
-
hazard
public static double hazard(double x, double shape, double rate, boolean giveLog) Returns the hazardrate * 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:
densityin classGenericDistribution
-
cumulative
public double cumulative(double x, boolean lowerTail, boolean logP) - Specified by:
cumulativein classGenericDistribution
-
quantile
public double quantile(double p, boolean lowerTail, boolean logP) - Specified by:
quantilein classGenericDistribution
-
random
public double random()- Specified by:
randomin classGenericDistribution
-