Namespaces

Types in MathNet.Numerics.Distributions

Type SkewedGeneralizedError

Namespace MathNet.Numerics.Distributions

Interfaces IContinuousDistribution

Continuous Univariate Skewed Generalized Error Distribution (SGED). Implements the univariate SSkewed 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.

Constructors

Static Functions

Methods

Properties

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

double CDF(double location, double scale, double skew, double p, double x)

double InvCDF(double location, double scale, double skew, double p, double pr)

bool IsValidParameterSet(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

double PDF(double location, double scale, double skew, double p, double x)

double PDFLn(double location, double scale, double skew, double p, double x)

double Sample(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.

double Sample(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.

void Samples(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.

void Samples(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

double CumulativeDistribution(double x)

double Density(double x)

double DensityLn(double x)

bool Equals(object obj)

int GetHashCode()

Type GetType()

double InverseCumulativeDistribution(double p)

double Sample()

void Samples(Double[] values)

IEnumerable<double> Samples()

string ToString()

A string representation of the distribution.
Return
string

a string representation of the distribution.

Public Properties

double Entropy get;

double Location get; set;

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

double Maximum get;

double Mean get;

double Median get;

double Minimum get;

double Mode get;

double P get; set;

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

Random RandomSource get; set;

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

double Scale get; set;

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

double Skew get; set;

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

double Skewness get;

double StdDev get;

double Variance get;