This function calculates the mode of a distribution, given as a ddf object.
In the case of the mode not being unique, by default all possible values are
returned. This behaviour can be controlled using the methods argument.
Details
A mode of a discrete random variable \(X\) is a value at which the probability mass function of \(X\) takes its maximal value.
In general, it is not unique which is the reason for this function to have
the method argument.
If
methodis set to "all", all values in the support which are a mode of the given distribution are returned. This is the default behaviour.If
methodis set to "mean", the mean of all such values is returned.If
methodis set to "min" or "max", the respective elements of all modes are returned.
