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)

Argument | Type | Details |

`name` | character | Full name of distribution. |

`short_name` | character | Short name to identify distribution. |

`type` | set6::Set | Scientific type. |

`support` | set6::Set | Distribution support. See Details. |

`symmetric` | logical | Is distribution symmetric? |

`pdf` | function | See Details. |

`cdf` | function | See Details. |

`quantile` | function | See Details. |

`rand` | function | See Details. |

`parameters` | ParameterSet | See Details. |

`decorators` | list | R6 decorators to add in construction. |

`valueSupport` | character | continuous, discrete, mixture. See Details. |

`variateForm` | character | univariate, multivariate, matrixvariate. See Details. |

`description` | character | Short description of distribution. |

`suppressMoments` | character | See Details. |

The most basic Distribution object consists of a name and one of pdf/cdf.

If supplied, `type`

and `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.
If only `type`

is supplied then this is taken to also be the support.

By default, missing `pdf`

, `cdf`

, `quantile`

and `rand`

are not automatically imputed.
Use the `FunctionImputation`

decorator to generate these.

See `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 `decorate`

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 `type`

and `support`

.

`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.

Variable | Return |

`name` | Name of distribution. |

`short_name` | Id of distribution. |

`description` | Brief description of distribution. |

Active Binding | Link |

`isPdf` | `isPdf` |

`isCdf` | `isCdf` |

`isQuantile` | `isQuantile` |

`isRand` | `isRand` |

See set6 for details on Sets and Intervals. See `ParameterSet`

for
parameter details. See `decorate`

for Decorator details.