CRAN Task View: Probability Distributions (original) (raw)

For most of the classical distributions, base R provides probability distribution functions (p), density functions (d), quantile functions (q), and random number generation (r). Beyond this basic functionality, many CRAN packages provide additional useful distributions. In particular, multivariate distributions as well as copulas are available in contributed packages.

The maintainers gratefully acknowledge Achim Zeileis, David Luethi, Tobias Verbeke, Robin Hankin, Mathias Kohl, G. Jay Kerns, Kjetil Halvorsen, William Asquith for their useful comments/suggestions. If you think information is not accurate or not complete, please send an e-mail to the maintainer or submit an issue or pull request in the GitHub repository linked above.

Some packages may optionally provide the symbolic derivatives with respect to the parameters for the probability functions. For instance, the first and second derivatives of the log-density can be of some help in estimation and inference tasks, and the derivatives of the quantile function can help when inferring on a given quantile. For that purpose, the following base R functions can be used stats::D() for derivatives w.r.t. a single parameter, or stats::deriv() for (partial) derivatives w.r.t. multiple parameters. The Deriv package provides a much more flexible symbolic differentiation interface. One can also use Stan Math library through StanHeaders package, see e.g. this blog. The nieve package provides symbolic differentiation for two probability distribution (Generalized Pareto and Generalized Extreme Value) in order to compute the log-likelihood for example.