Class R1ShapeScaleDiscrete

java.lang.Object

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


Author:
Lakshmi Krishnamurthy
  • Field Details

    • DISCRETE_RANDOM_FROM_INVERSE_CDF

      public static final int DISCRETE_RANDOM_FROM_INVERSE_CDF
      Generate Random Discrete from Inverse CDF
      See Also:
      Constant Field Values
    • DISCRETE_RANDOM_FROM_AHRENS_DIETER

      public static final int DISCRETE_RANDOM_FROM_AHRENS_DIETER
      Generate Random Discrete from Ahrens-Dieter (1982) Scheme
      See Also:
      Constant Field Values
    • DISCRETE_RANDOM_FROM_MARSAGLIA

      public static final int DISCRETE_RANDOM_FROM_MARSAGLIA
      Generate 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.Exception
      R1ShapeScaleDiscrete Constructor
      Parameters:
      shapeParameter - Shape Parameter
      scaleParameter - Scale Parameter
      gammaEstimator - Gamma Estimator
      digammaEstimator - Digamma Estimator
      lowerIncompleteGammaEstimator - Lower Incomplete Gamma Estimator
      randomGenerationScheme - 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.Exception
      Description copied from class: R1Univariate
      Generate a Random Variable corresponding to the Distribution
      Overrides:
      random in class R1Univariate
      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.Exception
      Generate 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.Exception
      Generate Inverse Gamma Distributed Random Number
      Returns:
      The Generalized Gamma Distributed Random Number
      Throws:
      java.lang.Exception - Thrown if the Inputs are Invalid