## Types in MathNet.Numerics.Distributions

Type SkewedGeneralizedError

Namespace MathNet.Numerics.Distributions

Interfaces IContinuousDistribution

Continuous Univariate Skewed Generalized Error Distribution (SGED). Implements the univariate Skewed Generalized Error Distribution. For details about this distribution, see. It includes Laplace, Normal and Student-t distributions. This is the SkewedGeneralizedT distribution with q=Inf.

This implementation is based on the R package dsgt and corresponding viginette, see. Compared to that implementation, the options for mean adjustment and variance adjustment are always true. The location (μ) is the mean of the distribution. The scale (σ) squared is the variance of the distribution.

The distribution will use the Random by default. Users can get/set the random number generator by using the RandomSource property.

The statistics classes will check all the incoming parameters whether they are in the allowed range.

### Public Constructors

#### SkewedGeneralizedError(double location, double scale, double skew, double p)

Initializes a new instance of the SkewedGeneralizedT class with a particular location, scale, skew and kurtosis parameters. Different parameterizations result in different distributions.
##### Parameters
###### `double` location

The location (μ) of the distribution.

###### `double` scale

The scale (σ) of the distribution. Range: σ > 0.

###### `double` skew

The skew, 1 > λ > -1

###### `double` p

Parameter that controls kurtosis. Range: p > 0

#### SkewedGeneralizedError()

Initializes a new instance of the SkewedGeneralizedError class. This is a generalized error distribution with location=0.0, scale=1.0, skew=0.0 and p=2.0 (a standard normal distribution).

### Public Static Functions

#### boolIsValidParameterSet(double location, double scale, double skew, double p)

Tests whether the provided values are valid parameters for this distribution.
##### Parameters
###### `double` location

The location (μ) of the distribution.

###### `double` scale

The scale (σ) of the distribution. Range: σ > 0.

###### `double` skew

The skew, 1 > λ > -1

###### `double` p

Parameter that controls kurtosis. Range: p > 0

#### doubleSample(double location, double scale, double skew, double p)

Generates a sample from the Skew Generalized Error distribution.
##### Parameters
###### `double` location

The location (μ) of the distribution.

###### `double` scale

The scale (σ) of the distribution. Range: σ > 0.

###### `double` skew

The skew, 1 > λ > -1

###### `double` p

Parameter that controls kurtosis. Range: p > 0

##### Return
###### `double`

a sample from the distribution.

#### doubleSample(Random rnd, double location, double scale, double skew, double p)

Generates a sample from the Skew Generalized Error distribution.
##### Parameters
###### `Random` rnd

The random number generator to use.

###### `double` location

The location (μ) of the distribution.

###### `double` scale

The scale (σ) of the distribution. Range: σ > 0.

###### `double` skew

The skew, 1 > λ > -1

###### `double` p

Parameter that controls kurtosis. Range: p > 0

##### Return
###### `double`

a sample from the distribution.

#### voidSamples(Double[] values, double location, double scale, double skew, double p)

Fills an array with samples from the Skew Generalized Error distribution using inverse transform.
##### Parameters
###### `Double[]` values

The array to fill with the samples.

###### `double` location

The location (μ) of the distribution.

###### `double` scale

The scale (σ) of the distribution. Range: σ > 0.

###### `double` skew

The skew, 1 > λ > -1

###### `double` p

Parameter that controls kurtosis. Range: p > 0

##### Return
###### `void`

a sequence of samples from the distribution.

#### voidSamples(Random rnd, Double[] values, double location, double scale, double skew, double p)

Fills an array with samples from the Skew Generalized Error distribution using inverse transform.
##### Parameters
###### `Random` rnd

The random number generator to use.

###### `Double[]` values

The array to fill with the samples.

###### `double` location

The location (μ) of the distribution.

###### `double` scale

The scale (σ) of the distribution. Range: σ > 0.

###### `double` skew

The skew, 1 > λ > -1

###### `double` p

Parameter that controls kurtosis. Range: p > 0

##### Return
###### `void`

a sequence of samples from the distribution.

#### IEnumerable<double>Samples(Random rnd, double location, double scale, double skew, double p)

Generates a sequence of samples from the Skew Generalized Error distribution using inverse transform.
##### Parameters
###### `Random` rnd

The random number generator to use.

###### `double` location

The location (μ) of the distribution.

###### `double` scale

The scale (σ) of the distribution. Range: σ > 0.

###### `double` skew

The skew, 1 > λ > -1

###### `double` p

Parameter that controls kurtosis. Range: p > 0

##### Return
###### `IEnumerable<double>`

a sequence of samples from the distribution.

#### IEnumerable<double>Samples(double location, double scale, double skew, double p)

Generates a sequence of samples from the Skew Generalized Error distribution using inverse transform.
##### Parameters
###### `double` location

The location (μ) of the distribution.

###### `double` scale

The scale (σ) of the distribution. Range: σ > 0.

###### `double` skew

The skew, 1 > λ > -1

###### `double` p

Parameter that controls kurtosis. Range: p > 0

##### Return
###### `IEnumerable<double>`

a sequence of samples from the distribution.

### Public Methods

#### stringToString()

A string representation of the distribution.
##### Return
###### `string`

a string representation of the distribution.

### Public Properties

#### doubleLocation get;

Gets the location (μ) of the Skewed Generalized t-distribution.

#### doubleP get;

Gets the parameter that controls the kurtosis of the distribution. Range: p > 0.

#### RandomRandomSource get; set;

Gets or sets the random number generator which is used to draw random samples.

#### doubleScale get;

Gets the scale (σ) of the Skewed Generalized t-distribution. Range: σ > 0.

#### doubleSkew get;

Gets the skew (λ) of the Skewed Generalized t-distribution. Range: 1 > λ > -1.