A generalised distribution object for defining custom probability distributions as well as serving as the parent class to specific, familiar distributions.
Returns R6 object of class Distribution.
Distribution$new(name = NULL, short_name = NULL, type = NULL, support = NULL, symmetric = FALSE, pdf = NULL, cdf = NULL, quantile = NULL, rand = NULL, parameters = NULL, decorators = NULL, valueSupport = NULL, variateForm = NULL, description = NULL, suppressMoments = TRUE)
|character||Full name of distribution.|
|character||Short name to identify distribution.|
|set6::Set||Distribution support. See Details.|
|logical||Is distribution symmetric?|
|list||R6 decorators to add in construction.|
|character||continuous, discrete, mixture. See Details.|
|character||univariate, multivariate, matrixvariate. See Details.|
|character||Short description of distribution.|
The most basic Distribution object consists of a name and one of pdf/cdf.
support should be given as a set6::Set object. If neither are supplied
then the set of Reals is taken to be the type and the dimension is the number of formal arguments in the pdf/cdf.
type is supplied then this is taken to also be the support.
By default, missing
rand are not automatically imputed.
FunctionImputation decorator to generate these.
ParameterSet for more details on construction of a ParameterSet.
decorators is an optional list of decorators (R6 environments not strings) to decorate the
Distribution in construction. Decorators can also be added after construction. See
for more details.
valueSupport should be one of continuous/discrete/mixture if supplied.
variateForm should be one of univariate/multivariate/matrixvariate if supplied.
If not given these are automatically filled from
suppressMoments can be used to prevent the skewness and kurtosis type being automatically
calculated in construction. This has the benefit of drastically decreasing computational time but
at the cost of losing these in the distribution properties.
|Name of distribution.|
|Id of distribution.|
|Brief description of distribution.|