NormalInverseGaussian {boodist}R Documentation

Normal-inverse Gaussian distribution

Description

A R6 class to represent a normal-inverse Gaussian distribution.

Details

See Wikipedia.

Active bindings

mu

Get or set the value of mu.

alpha

Get or set the value of alpha.

beta

Get or set the value of beta.

delta

Get or set the value of delta.

Methods

Public methods


Method new()

New normal-inverse Gaussian distribution.

Usage
NormalInverseGaussian$new(mu, alpha, beta, delta)
Arguments
mu

location parameter

alpha

tail heaviness parameter, >0

beta

asymmetry parameter

delta

scale parameter, >0

Returns

A NormalInverseGaussian object.


Method d()

Density function of the normal-inverse Gaussian distribution.

Usage
NormalInverseGaussian$d(x, log = FALSE)
Arguments
x

numeric vector

log

Boolean, whether to return the logarithm of the density

Returns

The density or the log-density evaluated at x.


Method p()

Cumulative distribution function of the normal-inverse Gaussian distribution.

Usage
NormalInverseGaussian$p(q)
Arguments
q

numeric vector of quantiles

Returns

The cumulative probabilities corresponding to q, with two attributes (see the Note).


Method q()

Quantile function of the normal-inverse Gaussian distribution.

Usage
NormalInverseGaussian$q(p, bounds = NULL)
Arguments
p

numeric vector of probabilities

bounds

bounds enclosing the quantiles to be found (see the Note), or NULL for automatic bounds

Returns

The quantiles corresponding to p.


Method r()

Sampling from the normal-inverse Gaussian distribution.

Usage
NormalInverseGaussian$r(n)
Arguments
n

number of simulations

Returns

A numeric vector of length n.


Method mean()

Mean of the normal-inverse Gaussian distribution.

Usage
NormalInverseGaussian$mean()
Returns

The mean of the normal-inverse Gaussian distribution.


Method sd()

Standard deviation of the normal-inverse Gaussian distribution.

Usage
NormalInverseGaussian$sd()
Returns

The standard deviation of the normal-inverse Gaussian distribution.


Method variance()

Variance of the normal-inverse Gaussian distribution.

Usage
NormalInverseGaussian$variance()
Returns

The variance of the normal-inverse Gaussian distribution.


Method skewness()

Skewness of the normal-inverse Gaussian distribution.

Usage
NormalInverseGaussian$skewness()
Returns

The skewness of the normal-inverse Gaussian distribution.


Method kurtosis()

Kurtosis of the normal-inverse Gaussian distribution.

Usage
NormalInverseGaussian$kurtosis()
Returns

The kurtosis of the normal-inverse Gaussian distribution.


Method kurtosisExcess()

Kurtosis excess of the normal-inverse Gaussian distribution.

Usage
NormalInverseGaussian$kurtosisExcess()
Returns

The kurtosis excess of the normal-inverse Gaussian distribution.


Method clone()

The objects of this class are cloneable with this method.

Usage
NormalInverseGaussian$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Note

The cumulative distribution function is evaluated by integrating the density function (in C++). Its returned value has two attributes: a numeric vector "error_estimate" and an integer vector "error_code". The error code is 0 if no problem is detected. If an error code is not 0, a warning is thrown. The quantile function is evaluated by root-finding and then the user must provide some bounds enclosing the values of the quantiles or choose the automatic bounds. A maximum number of iterations is fixed in the root-finding algorithm. If it is reached, a warning is thrown.


[Package boodist version 1.0.0 Index]