| NormalInverseGaussian {boodist} | R Documentation |
Normal-inverse Gaussian distribution
Description
A R6 class to represent a normal-inverse Gaussian distribution.
Details
See Wikipedia.
Active bindings
muGet or set the value of
mu.alphaGet or set the value of
alpha.betaGet or set the value of
beta.deltaGet or set the value of
delta.
Methods
Public methods
Method new()
New normal-inverse Gaussian distribution.
Usage
NormalInverseGaussian$new(mu, alpha, beta, delta)
Arguments
mulocation parameter
alphatail heaviness parameter,
>0betaasymmetry parameter
deltascale parameter,
>0
Returns
A NormalInverseGaussian object.
Method d()
Density function of the normal-inverse Gaussian distribution.
Usage
NormalInverseGaussian$d(x, log = FALSE)
Arguments
xnumeric vector
logBoolean, 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
qnumeric 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
pnumeric vector of probabilities
boundsbounds enclosing the quantiles to be found (see the Note), or
NULLfor automatic bounds
Returns
The quantiles corresponding to p.
Method r()
Sampling from the normal-inverse Gaussian distribution.
Usage
NormalInverseGaussian$r(n)
Arguments
nnumber 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
deepWhether 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.