Gamma Distribution Constructor
Definition
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.10.0
Overload List
| Gamma | Constructs a new standard GammaDistribution with the specified order parameter. |
| Gamma | Estimates the parameters of the distribution of a variable assuming it follows a gamma distribution using the method of matching moments. |
| Gamma | Constructs a new GammaDistribution with the specified order and scale parameter. |
| Gamma | Estimates the parameters of the distribution of a variable assuming it follows a gamma distribution. |
| Gamma | Constructs a new GammaDistribution with the specified order, scale, and location parameters. |
GammaDistribution(Double)
public GammaDistribution(
double order
)Parameters
- order Double
- The order of the distribution. Must be strictly greater than zero.
Remarks
order must be strictly greater than zero. The location parameter of the distribution is set to zero. The scale parameter is set to 1.
Exceptions
| Argument | The order order is less than or equal to zero. |
GammaDistribution(Vector<Double>)
public GammaDistribution(
Vector<double> variable
)Parameters
Remarks
This overload uses Default, which selects matching moments with population variance. It estimates shape and scale with location fixed at zero. To obtain maximum likelihood estimates, use the overload accepting an EstimationMethod and specify MaximumLikelihood.
Exceptions
| Argument | variable is null. |
GammaDistribution(Double, Double)
public GammaDistribution(
double order,
double scale
)Parameters
Remarks
order and scale must be strictly greater than zero. The location parameter of the distribution is set to zero.
Exceptions
| Argument | The order order or the scale factor scale is less than or equal to zero. |
GammaDistribution(Vector<Double>, EstimationMethod)
public GammaDistribution(
Vector<double> variable,
EstimationMethod method
)Parameters
- variable Vector<Double>
- The sample observations used to estimate the distribution parameters.
- method EstimationMethod
- A EstimationMethod value that specifies the method used to estimate the distribution's parameters.
Remarks
Default and MatchingMoments both use matching moments. With sample mean m and population variance v (divisor equal to the sample count), the fitted shape is m * m / v and the scale is v / m. Maximum likelihood is used only when MaximumLikelihood is explicitly requested.
The fitted distribution uses the shape-scale parameterization: ShapeParameter is the shape and ScaleParameter is the scale, rather than a rate. LocationParameter is fixed at zero for both estimation methods. The estimation method selects how these distribution parameters are obtained; it does not change their meaning.
Exceptions
| Argument | variable is null. |
GammaDistribution(Double, Double, Double)
public GammaDistribution(
double order,
double scale,
double location
)Parameters
Remarks
order and scale must be strictly greater than zero.
Exceptions
| Argument | order is NaN or less than or equal to zero. -or- scale is NaN or less than or equal to zero. |