Function to calculate the mode of a unimodal distribution which is specified by the root of the density function name and the corresponding parameters.
1 |
densFn |
Character. The name of the density function for which the mode is required. |
param |
Numeric. A vector giving the parameter values for the
distribution specified by |
... |
Passes arguments to |
The name of the unimodal density function must be supplied as the
characters of the root for that density (e.g. norm
,
ghyp
). The particular unimodal distribution being considered is
specified by the value of the argument param
, or for base R
distributions by specification in the ... arguments.
The mode is found by a numerical optimization using
optimize
.
David Scott d.scott@auckland.ac.nz, Joyce Li xli053@aucklanduni.ac.nz
1 2 3 |
Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.