Package org.drip.measure.gamma
Class R1ShapeScaleDiscrete
java.lang.Object
org.drip.measure.continuous.R1Univariate
org.drip.measure.gamma.R1ShapeScaleDistribution
org.drip.measure.gamma.R1ShapeScaleDiscrete
public class R1ShapeScaleDiscrete extends R1ShapeScaleDistribution
R1ShapeScaleDiscrete generates Discrete Variables that are Derivatives of the R1 Gamma
Distribution. The References are:
- Devroye, L. (1986): Non-Uniform Random Variate Generation Springer-Verlag New York
- Gamma Distribution (2019): Gamma Distribution https://en.wikipedia.org/wiki/Chi-squared_distribution
- Louzada, F., P. L. Ramos, and E. Ramos (2019): A Note on Bias of Closed-Form Estimators for the Gamma Distribution Derived From Likelihood Equations The American Statistician 73 (2) 195-199
- Minka, T. (2002): Estimating a Gamma distribution https://tminka.github.io/papers/minka-gamma.pdf
- Ye, Z. S., and N. Chen (2017): Closed-Form Estimators for the Gamma Distribution Derived from Likelihood Equations The American Statistician 71 (2) 177-181
- Module = Computational Core Module
- Library = Numerical Analysis Library
- Project = Rd Continuous/Discrete Probability Measures
- Package = R1 Gamma Distribution Implementation/Properties
- Author:
- Lakshmi Krishnamurthy
-
Field Summary
Fields Modifier and Type Field Description static intDISCRETE_RANDOM_FROM_AHRENS_DIETERGenerate Random Discrete from Ahrens-Dieter (1982) Schemestatic intDISCRETE_RANDOM_FROM_INVERSE_CDFGenerate Random Discrete from Inverse CDFstatic intDISCRETE_RANDOM_FROM_MARSAGLIAGenerate Random Discrete from Marsaglia (1977) Scheme -
Constructor Summary
Constructors Constructor Description R1ShapeScaleDiscrete(double shapeParameter, double scaleParameter, R1ToR1 gammaEstimator, R1ToR1 digammaEstimator, R2ToR1 lowerIncompleteGammaEstimator, int randomGenerationScheme)R1ShapeScaleDiscrete Constructor -
Method Summary
Modifier and Type Method Description doublerandom()Generate a Random Variable corresponding to the DistributiondoublerandomGeneralizedGamma(double q)Generate Generalized Gamma Distributed Random NumberintrandomGenerationScheme()Retrieve the Discrete Random Number Generator SchemedoublerandomInverseGamma()Generate Inverse Gamma Distributed Random NumberMethods inherited from class org.drip.measure.gamma.R1ShapeScaleDistribution
bannehekeEkayanakeMedianApproximation, chenRubinMedianLowerBound, chenRubinMedianUpperBound, cltProxy, cumulative, density, differentialEntropy, digammaEstimator, excessKurtosis, exponentialFamilyRepresentation, gammaEstimator, laplacian, logarithmicExpectation, lowerIncompleteGammaEstimator, mean, mode, momentGeneratingFunction, naturalParameters, naturalStatistics, ramanujanChoiMedianApproximation, randomAhrensDieter1982, randomMarsaglia1977, scale, ShapeRate, shapeScaleParameters, ShapeSummation, skewness, Standard, support, varianceMethods inherited from class org.drip.measure.continuous.R1Univariate
bPOE, centralMoment, cvar, expectedShortfall, fisherInformation, histogram, incremental, invCumulative, iqr, kullbackLeiblerDivergence, median, nonCentralMoment, populationCentralMeasures, probabilityGeneratingFunction, quantile, randomArray, supported, tukeyAnomaly, tukeyCriterionMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
DISCRETE_RANDOM_FROM_INVERSE_CDF
public static final int DISCRETE_RANDOM_FROM_INVERSE_CDFGenerate Random Discrete from Inverse CDF- See Also:
- Constant Field Values
-
DISCRETE_RANDOM_FROM_AHRENS_DIETER
public static final int DISCRETE_RANDOM_FROM_AHRENS_DIETERGenerate Random Discrete from Ahrens-Dieter (1982) Scheme- See Also:
- Constant Field Values
-
DISCRETE_RANDOM_FROM_MARSAGLIA
public static final int DISCRETE_RANDOM_FROM_MARSAGLIAGenerate Random Discrete from Marsaglia (1977) Scheme- See Also:
- Constant Field Values
-
-
Constructor Details
-
R1ShapeScaleDiscrete
public R1ShapeScaleDiscrete(double shapeParameter, double scaleParameter, R1ToR1 gammaEstimator, R1ToR1 digammaEstimator, R2ToR1 lowerIncompleteGammaEstimator, int randomGenerationScheme) throws java.lang.ExceptionR1ShapeScaleDiscrete Constructor- Parameters:
shapeParameter- Shape ParameterscaleParameter- Scale ParametergammaEstimator- Gamma EstimatordigammaEstimator- Digamma EstimatorlowerIncompleteGammaEstimator- Lower Incomplete Gamma EstimatorrandomGenerationScheme- Scheme for the Random Gamma NUmber Generator- Throws:
java.lang.Exception- Thrown if the Inputs are Invalid
-
-
Method Details
-
randomGenerationScheme
public int randomGenerationScheme()Retrieve the Discrete Random Number Generator Scheme- Returns:
- The Discrete Random Number Generator Scheme
-
random
public double random() throws java.lang.ExceptionDescription copied from class:R1UnivariateGenerate a Random Variable corresponding to the Distribution- Overrides:
randomin classR1Univariate- Returns:
- Random Variable corresponding to the Distribution
- Throws:
java.lang.Exception- Thrown if the Random Instance cannot be estimated
-
randomGeneralizedGamma
public double randomGeneralizedGamma(double q) throws java.lang.ExceptionGenerate Generalized Gamma Distributed Random Number- Parameters:
q- The Power Parameter- Returns:
- The Generalized Gamma Distributed Random Number
- Throws:
java.lang.Exception- Thrown if the Inputs are Invalid
-
randomInverseGamma
public double randomInverseGamma() throws java.lang.ExceptionGenerate Inverse Gamma Distributed Random Number- Returns:
- The Generalized Gamma Distributed Random Number
- Throws:
java.lang.Exception- Thrown if the Inputs are Invalid
-