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.
Ultimate bibles on probability distributions are:
-
different volumes of N. L. Johnson, S. Kotz and N. Balakrishnan books, e.g. Continuous Univariate Distributions, Vol. 1,
-
Thesaurus of univariate discrete probability distributions by G. Wimmer and G. Altmann.
-
Statistical Distributions by M. Evans, N. Hastings, B. Peacock.
-
Distributional Analysis with L-moment Statistics using the R Environment for Statistical Computing, Asquith (2011).
The maintainer gratefully acknowledges 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 let me know.
-
Base R provides probability distribution functions
p
foo
()
density functions
d
foo
(), quantile functions
q
foo
(), and random number generation
r
foo
()
where
foo
indicates the type
of distribution:
beta (
foo
=
beta),
binomial
binom,
Cauchy
cauchy,
chi-squared
chisq,
exponential
exp,
Fisher F
f,
gamma
gamma,
geometric
geom,
hypergeometric
hyper,
logistic
logis,
lognormal
lnorm,
negative binomial
nbinom,
normal
norm,
Poisson
pois,
Student t
t,
uniform
unif,
Weibull
weibull.
Following the same naming scheme, but somewhat less standard are the following distributions
in base R: probabilities of coincidences (also known as "birthday paradox")
birthday
(only p and q), studentized range distribution
tukey
(only p and q), Wilcoxon signed rank distribution
signrank, Wilcoxon
rank sum distribution
wilcox.
-
Probability generating function:
Compounding
provides pgf for
xxx
distribution,
inverse
xxx
distribution,
first derivative of the
xxx
distribution,
where
xxx
belongs to binomial, binomial-Poisson, geometric, hypergeometric,
hyper-Poisson, Katti type H1/H2, logarithmic, logarithmic-binomial,
logarithmic-Poisson, negative binomial, Neyman type A/B/C, Pascal-Poisson, Poisson,
Poisson-binomial, Poisson-Lindley, Poisson-Pascal, Polya Aeppli, Thomas,
Waring, Yule.
-
Beta-binomial distribution:
provided in
VGAM,
extraDistr,
rmutil,
emdbook.
ZI/ZM beta binomial distributions are
implemented in
gamlss.dist.
-
Beta-geometric distribution:
provided in
VGAM.
-
Binomial (including Bernoulli) distribution:
provided in
stats
.
Zero-modified, zero-inflated, truncated versions are provided
in
gamlss.dist,
extraDistr,
actuar
and in
VGAM.
LaplacesDemon
provides dedicated functions for the Bernoulli distribution.
rmutil
provides the double binomial and the
multiplicative binomial distributions.
Summary for Binomial-related distributions
Distribution name
|
Packages
|
Functions
|
Distribution suffix
|
binomial
|
stats
|
d, p, q, r
|
binom
|
zero-infl. binomial
|
extraDistr
|
d, p, q, r
|
zib
|
zero-infl. binomial
|
VGAM
|
d, p, q, r
|
zibinom
|
zero-infl. binomial
|
gamlss.dist
|
d, p, q, r
|
ZIBI
|
zero mod. binomial
|
VGAM
|
d, p, q, r
|
zabinom
|
zero mod. binomial
|
actuar
|
d, p, q, r
|
zmbinom
|
zero mod. binomial
|
gamlss.dist
|
d, p, q, r
|
ZABI
|
zero trunc. binomial
|
actuar
|
d, p, q, r
|
ztbinom
|
trunc. binomial
|
extraDistr
|
d, p, q, r
|
tbinom
|
-
Benford distribution:
provided in
VGAM
and
BenfordTests.
-
Bernoulli distribution:
provided in
extraDistr.
-
Borel-Tanner distribution:
provided in
VGAM.
-
Complex Pearson distribution:
cpd
provides
the complex biparamtric and triparametric Pearson distribution.
-
Delaporte distribution:
provided in
gamlss.dist
and
Delaporte.
-
Dirac distribution:
provided in
distr.
-
Discrete categorical distribution:
provided in
LaplacesDemon.
-
Discrete exponential distribution:
provided in
poweRlaw.
-
Discrete gamma distribution:
provided in
extraDistr.
-
Discrete inverse Weibull distribution:
DiscreteInverseWeibull
provides d, p, q, r functions for the
inverse Weibull as well as hazard rate function and moments.
-
Discrete Laplace distribution:
The discrete Laplace distribution is provided in
extraDistr
(d, p, r).
The skew discrete Laplace distribution has two parametrization (DSL and ADSL),
both provided in
DiscreteLaplace
and DSL in
disclap.
LaplacesDemon
also provides the DSL parametrization only.
-
Discrete lognormal distribution:
provided in
poweRlaw.
-
Discrete normal distribution:
provided in
extraDistr.
-
Discrete uniform distribution:
can be easily obtained with
the functions
sum,cumsum,sample
and is provided in
extraDistr.
-
Discrete Weibull distribution:
provided in
DiscreteWeibull:
d, p, q, r, m for disc. Weib. type 1, d, p, q, r, m, h for disc. Weib. type 3.
extraDistr
provides d, p, q, r for Type 1.
-
Felix distribution:
provided in
VGAM.
-
gamma count distribution:
provided in
rmutil.
-
Geometric distribution:
provided in
stats
.
Zero-modified, zero-inflated, truncated versions are provided
in
gamlss.dist,
actuar
and in
VGAM.
-
Geometric (compound) Poisson distribution
(also known Polya-Aeppli distribution):
provided in
polyaAeppli.
-
Generalized binomial distribution:
provided in
GenBinomApps.
-
Generalized Hermite distribution:
provided in
hermite.
-
Hypergeometric distribution:
provided in
stats
.
Non-central hypergeometric distribution is provided in
MCMCpack
(d,r).
Extended hypergeometric distribution can be found in
BiasedUrn
package,
which provides not only p, d, q, r functions but also mean, variance, mode functions.
Generalized hypergeometric distribution is implemented in
SuppDists.
Negative hypergeometric distribution is provided in
tolerance,
extraDistr.
-
Lagrangian Poisson distribution:
RMKdiscrete
provides d, p, q, r functions for the
univariate and the bivariate Lagrangian Poisson distribution.
-
Lindley's power series distribution:
provided in
LindleyPowerSeries.
-
Logarithmic distribution:
This can be found in
extraDistr,
VGAM,
actuar
and
gamlss.dist.
Zero-modified and zero-truncated versions is provided in
actuar.
A fast random generator is
available for the logarithmic distribution
is implemented in
Runuran
as well as the 'density' function.
-
Poisson distribution:
provided in
stats
and in
poweRlaw.
Zero-modified, zero-inflated, truncated versions are provided
in
extraDistr,
gamlss.dist,
actuar
and in
VGAM.
extraDistr
provides the truncated Poisson distribution.
LaplacesDemon
provides the generalized Poisson distribution.
rmutil
provides the double Poisson,
the multiplicative Poisson
and the Power variance function Poisson distributions.
See the mixture section such as the Poisson-lognormal mixture.
-
Poisson-Lindley distribution:
provided in
tolerance.
-
Power law distribution:
provided in
poweRlaw.
-
Mana Clash distribution:
provided in
RMKdiscrete.
-
Negative binomial distribution:
provided in
stats
.
Zero-modified, zero-inflated, truncated versions are provided
in
gamlss.dist,
extraDistr,
emdbook,
actuar
and in
VGAM.
New parametrization of the negative binomial distribution
is available in
RMKdiscrete.
-
Sichel distribution:
provided in
gamlss.dist.
-
Skellam distribution:
provided in
extraDistr,
VGAM
and
skellam.
-
Waring distribution:
sampling in
degreenet.
-
Yule-Simon distribution:
provided in
VGAM
and sampling in
degreenet.
-
Zeta and Haight's Zeta distribution:
provided in
VGAM,
tolerance.
-
Zipf distribution and extensions:
d, p, q, r functions of the Zipf and the Zipf-Mandelbrot distributions
are provided in
tolerance,
VGAM.
Package
zipfR
provides tools for distribution of word frequency,
such as the Zipf distribution.
zipfextR
provides three extensions of the Zipf distribution:
the Marshall-Olkin Extended Zipf,
the Zipf-Poisson Extreme and
the Zipf-Poisson Stopped Sum distributions.
-
Bivariate binomial:
d, p functions provided in
bivariate.
-
Bivariate geometric:
d, r functions provided in
bivgeom.
BivGeo
provides the Basu-Dhar bivariate geometric distribution.
-
Bivariate Poisson:
d, p functions provided in
bivariate.
-
Bivariate Poisson-lognormal:
provided in
poilog.
-
Bivariate uniform:
d, p functions provided in
bivariate.
-
Hyper Dirichlet distribution:
provided in
hyper2
package.
-
Multinomial distribution:
stats,
mc2d,
extraDistr
packages provide d, r functions.
r is provided in
MultiRNG
and
compositions.
p function is provided by
pmultinom.
-
Multinomial Dirichlet distribution:
functions d, r are provided in
MCMCpack,
mc2d,
dirmult,
extraDistr
and
bayesm.
r is provided in
MultiRNG.
-
Negative multinomial distribution:
A bivariate distribution with negative-binomial marginals is available in
RMKdiscrete.
The multiplicative multinomial distribution is implemented in
MM.
-
Multivariate Poisson distribution:
compositions
provides a random generator.
-
Multivariate hypergeometric distribution:
provided in
extraDistr.
-
Multivariate Polya distribution:
functions d, r of the Dirichlet Multinomial (also known as multivariate Polya)
distribution are provided in
extraDistr,
LaplacesDemon
and
Compositional.
-
Multivariate Ewens distribution:
not yet implemented?
-
Truncated Stick-Breaking distribution:
provided in
LaplacesDemon.
-
Arcsine distribution:
implemented in package
distr.
-
Beta distribution and its extensions:
Base R provides
the d, p, q, r functions for this distribution (see above).
extraDistr
provides the beta distribution
parametrized by the mean and the precision.
actuar
provides moments and limited expected values.
sadists
implements Gram Charlier, Edgeworth and Cornish-Fisher approximations
for doubly non central beta distribution for computing d, p, q, r functions.
extraDistr
provides the four-parameter beta with lower and upper bounds.
The generalized beta of the first kind (GB1) (exponentiation of beta 1)
is provided in
gamlss.dist,
mbbefd,
actuar.
The beta prime (or beta of the second kind), which is the distribution of X/(1-X) when
X follows a beta distribution of the first kind,
is provided in
VGAM,
extraDistr,
LaplacesDemon
and
mc2d.
The zero and one inflated beta distribution can be found in
gamlss.dist.
The generalized beta of the second kind (GB2) is provided in
gamlss.dist,
GB2.
Several special cases of the generalized beta distribution are
also implemented in
VGAM,
mc2d: Lomax, inverse Lomax, Dagum, Singh-Maddala, Pert distributions.
actuar
provides the transformed beta 2 distribution which includes
as special cases Burr, loglogistic, paralogistic, generalized Pareto, Pareto,
see also the Pareto subsection.
llogistic
provides the log-logistic parametrized by the median.
Summary for Beta-related distributions
Distribution name
|
Packages
|
Functions
|
Distribution suffix
|
Beta (1st kind)
|
stats
|
d, p, q, r
|
beta
|
Beta
|
actuar
|
m, mgf, lev
|
beta
|
Beta
|
extraDistr
|
d, p, q, r
|
prop
|
Doubly non central beta
|
sadists
|
d, p, q, r
|
nbeta
|
4-param beta
|
extraDistr
|
d, p, q, r
|
nsbeta
|
zero-infl beta
|
gamlss.dist
|
d, p, q, r
|
BEZI
|
one-infl beta
|
gamlss.dist
|
d, p, q, r
|
BEOI
|
one-infl beta
|
mbbefd
|
d, p, q, r, m, ec
|
oibeta
|
GB1
|
gamlss.dist
|
d, p, q, r
|
GB1
|
GB1
|
mbbefd
|
d, p, q, r, m, ec
|
gbeta
|
GB1
|
actuar
|
d, p, q, r, m, lev
|
genbeta
|
one-infl GB1
|
mbbefd
|
d, p, q, r, m, ec
|
oigbeta
|
Summary for Beta-2-related distributions
Distribution name
|
Packages
|
Functions
|
Distribution suffix
|
Beta (2nd kind)
|
VGAM
|
d, p, q, r
|
beta
|
Beta (2nd kind)
|
extraDistr
|
d, p, q, r
|
invbeta
|
Beta (2nd kind)
|
LaplacesDemon
|
d, r
|
betapr
|
GB2
|
VGAM
|
d, p, q, r
|
genbetaII
|
GB2
|
gamlss.dist
|
d, p, q, r
|
GB2
|
GB2
|
GB2
|
d, p, q, r
|
gb2
|
Trans beta 2
|
actuar
|
d, p, q, r, m, lev
|
trbeta
|
-
Benini distribution:
provided in
VGAM.
-
Bezier-Montenegro-Torres distribution:
provided in
BMT.
-
Bhattacharjee (normal+uniform) distribution:
provided in package
extraDistr.
-
Birnbaum-Saunders distribution:
provided in package
VGAM
and
extraDistr.
-
Bridge distribution:
provided in
bridgedist,
as detailed in Wang and Louis (2003).
The distribution of random intercept that allows a marginalized
random intercept logistic regression to also be logistic
regression.
-
Box Cox distribution:
gamlss.dist
provides the Box-Cox normal,
the Box-Cox power exponential and the Box-Cox t distributions.
rmutil
provides the Box-Cox normal.
-
Burr distribution:
see Pareto.
-
Cardioid distribution:
provided in
VGAM
(d,p,q,r) and
CircStats,
circular
(d,r).
-
Carthwrite's Power-of-Cosine distribution:
provided in
circular
(d,r).
-
Cauchy distribution:
Base R provides
the d, p, q, r functions for this distribution (see above). Other
implementations are available in
lmomco
and
sgt.
The skew Cauchy distribution is provided in
sn.
LaplacesDemon
provides d, p, q, r functions for the Half-Cauchy
distribution.
The wrapped Cauchy distribution is provided in
CircStats.
-
Chen distribution:
provided in
reliaR.
-
Chi(-squared or not) distribution:
Base R provides
the d, p, q, r functions for the chi-squared distribution, both central
and non-central (see above).
Moments, limited
expected values and the moment generating function are provided in
actuar.
extraDistr
provides d, p, q, r functions for inverse chi-squared
distribution (standard and scaled).
Only d,r functions are available for the inverse chi-squared distribution
in package
geoR
and
LaplacesDemon.
A fast random generator is available for the Chi distribution
is implemented in
Runuran
as well as the density function.
The non-central Chi distribution is not yet implemented. The chi-bar-squared distribution
is implemented in
emdbook.
sadists
implements Gram Charlier, Edgeworth and Cornish-Fisher approximations
for sums of non central chi-squared raised to powers distribution and sums of log of
non central chi-squared for computing d, p, q, r functions.
Summary for Chi-related distributions
Distribution name
|
Packages
|
Functions
|
Distribution suffix
|
Chi-squared
|
stats
|
d, p, q, r
|
chisq
|
Chi-squared
|
actuar
|
m, mgf, lev
|
chisq
|
Chi-squared
|
Runuran
|
d, r
|
chisq
|
Chi-bar-squared
|
emdbook
|
d, p, q, r
|
chibarsq
|
Chi
|
Runuran
|
d, r
|
chi
|
Inverse Chi-squared
|
geoR
|
d, r
|
invchisq
|
Inverse Chi-squared
|
extraDistr
|
d, p, q, r
|
invchisq
|
Scaled Inverse Chi-squared
|
extraDistr
|
d, p, q, r
|
invchisq
|
Sum of power Chi-squared
|
sadists
|
d, p, q, r
|
sumchisqpow
|
Sum of log Chi-squared
|
sadists
|
d, p, q, r
|
sumlogchisq
|
-
Circular distribution:
uniform circular provided in
circular
(d,r);
Generalized von Mises circular provided in
circular
(d).
-
Consul distribution:
see
rmutil.
-
Continuous binomial distribution:
cbinom
provides the d/p/q/r functions for a continuous analog to the standard discrete
binomial with continuous size parameter and continuous support with x in [0, size + 1].
-
Dagum distribution:
see beta.
-
Davies distribution:
The Davies distribution is provided
in
Davies
package.
-
(non-central) Dunnett's test distribution:
provided
in
nCDunnett.
-
Eta-mu distribution:
provided in
lmomco.
sadists
implements Gram Charlier, Edgeworth and Cornish-Fisher approximations
for doubly non central eta distribution for computing d, p, q, r functions.
-
Exponential distribution and its extensions:
Base R provides the d, p, q, r functions
for this distribution (see above).
actuar
provides additional functions
such as the moment generating function, moments and limited expected values. It also has
the d, p, q, r for the inverse exponential distribution.
The shifted (or two-parameter exponential) and the
truncated exponential distributions are implemented in
lmomco
and
tolerance
packages with d, p, q, r functions.
Exponential Power distribution is also known as General Error Distribution:
d, p, q, r functions for the power and the skew power exponential
type 1-4 distributions are implemented
in
gamlss.dist
and
lmomco.
The power exponential distribution is also provided in
normalp,
rmutil,
LaplacesDemon
and
sgt.
The skew power exponential is provided
sgt.
reliaR
provides
the generalized exponential, the inverse generalized exponential,
the logistic exponential, the Marshall-Olkin Extended Exponential and
the exponential extension distributions.
A fast random generator is available for the power Exponential distribution
is implemented in
Runuran
as well as the density function.
Summary for exponential-related distributions
Distribution name
|
Packages
|
Functions
|
Distribution suffix
|
Exponential
|
stats
|
d, p, q, r
|
exp
|
Exponential
|
actuar
|
m, mgf, lev
|
exp
|
Exponential
|
gamlss.dist
|
d, p, q, r
|
EXP
|
Exponential
|
poweRlaw
|
d, p, q, r
|
exp
|
Inverse exponential
|
actuar
|
d, p, q, r, m, lev
|
invexp
|
Shifted exponential
|
lmomco
|
d, p, q, r, lm, tlmr
|
exp
|
Shifted exponential
|
tolerance
|
d, p, q, r
|
2exp
|
Truncated exponential
|
lmomco
|
d, p, q, r, lm, tlmr
|
texp
|
Truncated exponential
|
ReIns
|
d, p, q, r
|
texp
|
Power exponential
|
normalp
|
d, p, q, r
|
normp
|
Power exponential
|
Runuran
|
d, r
|
exp
|
Power exponential
|
rmutil
|
d, r
|
powexp
|
Skew power exp.
|
lmomco
|
d, p, q, r, lm, tlmr
|
aep4
|
Power and skew power exp.
|
gamlss.dist
|
d, p, q, r
|
PE, SEP
|
Generalized and inverse gen. exp.
|
reliaR
|
d, p, q, r
|
gen.exp, inv.genexp
|
Logistic, Marshall-Olkin Ext. exp. and exp. ext.
|
reliaR
|
d, p, q, r
|
logis.exp, moee, exp.ext
|
-
Externally studentized midrange distribution:
Package
SMR
computes the studentized midrange distribution (d, p, q, r).
-
Fisher-Snedecor (or F) distribution:
Base R provides the d, p, q, r functions
for the F distribution, possibly with a non-central parameter.
sadists
implements Gram Charlier, Edgeworth and Cornish-Fisher approximations
for doubly non central Fisher distribution (and product of multiple
doubly non central Fisher distribution) for computing d, p, q, r functions.
flexsurv
provides d, p, q, r functions as well as
hazard (h) and integrated hazard rate (i) functions for
the generalized F distribution.
fpow
returns the noncentrality parameter of the noncentral F distribution
if probability of type I and type II error, degrees of freedom of the numerator
and the denominator are given.
-
Frechet distribution:
provided in
VGAM,
RTDE,
ReIns,
extraDistr
and
evd. A fast random generator is
available for the Frechet distribution
is implemented in
Runuran
as well as the density function.
The truncated Frechet distribution is provided in
ReIns.
-
Friedman's Chi distribution:
provided in
SuppDists.
-
Gamma distribution and its extensions:
Base R provides
the d, p, q, r functions for this distribution (see above).
EnvStats
provides d, p, q, r functions of the gamma
parametrized by the mean and the coefficient of variation.
actuar
provides d, p, q, r functions of the inverse, the inverse
transformed and the log gamma distributions
while
ghyp
provides those functions for the variance gamma distribution.
extraDistr
and
LaplacesDemon
provide the inverse gamma distribution.
VarianceGamma
provides d, p, q, r functions for the variance gamma distribution
as well as moments (skewness, kurtosis, ...).
VGAM
provides d, p, q, r functions of the log
gamma and the generalized gamma distribution. The generalized gamma distribution
can also be found in
gamlss.dist.
reliaR
provides
the log gamma distribution. See Pearson III for a three-parameter
gamma distribution with a location parameter.
flexsurv
provides d, p, q, r functions as well as
hazard (h) and integrated hazard rate (i) functions for
the generalized gamma distribution.
coga
provides d, p, r functions for a sum of independent but
not identically distributed gamma distributions.
MCMCpack
provides d, r functions of the Inverse Gamma.
rmutil
provides the generalized Gamma.
distTails
provides the full-tail gamma distribution
Summary for gamma-related distributions
Distribution name
|
Packages
|
Functions
|
Distribution suffix
|
Gamma
|
stats
|
d, p, q, r
|
gamma
|
Gamma
|
actuar
|
m, mgf, lev
|
gamma
|
Gamma
|
EnvStats
|
d, p, q, r
|
gammaAlt
|
Inverse gamma
|
actuar
|
d, p, q, r, m, lev, mgf
|
invgamma
|
Inverse gamma
|
extraDistr
|
d, p, q, r
|
invgamma
|
Inverse gamma
|
LaplacesDemon
|
d, r
|
invgamma
|
Inverse gamma
|
MCMCpack
|
d, r
|
invgamma
|
Log-gamma
|
actuar
|
d, p, q, r, m, lev
|
lgamma
|
Log-gamma
|
VGAM
|
d, p, q, r
|
lgamma
|
Variance gamma
|
ghyp
|
d, p, q, r
|
VG
|
Variance gamma
|
VarianceGamma
|
d, p, q, r, m
|
vg
|
Generalized gamma
|
flexsurv
|
d, p, q, r, h, i
|
gengamma
|
Generalized gamma
|
gamlss.dist
|
d, p, q, r
|
GG
|
Generalized gamma
|
VGAM
|
d, p, q, r
|
gengamma.stacy
|
Generalized gamma
|
rmutil
|
d, p, q, r
|
ggamma
|
convolution of gamma
|
coga
|
d, p, r
|
coga
|
Full-taill gamma
|
distTails
|
d, p, r
|
dFTG
|
-
Gaussian (or normal) distribution and its extensions:
Base R provides
the d, p, q, r functions for this distribution (see above).
actuar
provides the moment generating function and moments.
The
truncnorm
package provides d, p, q, r functions for the truncated
gaussian distribution as well as functions for the first two moments.
mvrtn
provides random variates for left/right truncated normal distributions.
EnvStats
provides d, p, q, r functions for the truncated normal distribution
and the zero-modified distribution.
extraDistr
provides the truncated normal.
LaplacesDemon
provides d, p, q, r functions for the Half-normal
distribution.
The wrapped normal distribution is provided in
CircStats.
lmomco
implements the generalized normal distribution.
The Exponentially modified Gaussian is available in
emg,
gamlss.dist
and
retimes.
sn
implements the skew normal distribution.
greybox
implements the folded normal distribution.
VGAM
implements the folded and the skewed normal distribution, and
csn
provides d, r functions for the closed skew normal distribution.
CompQuadForm
provides the distribution function of quadratic forms
in normal variates.
NormalGamma
provides the density of the sum of a gaussian and a gamma random variables.
NormalLaplace
provides d, p, q, r functions for the sum of a normal
and a Laplace random variables, while
LaplacesDemon
provides
d, r function of the sum of a normal and a Laplace random variables.
Summary for Gaussian-related distributions
Distribution name
|
Packages
|
Functions
|
Distribution suffix
|
Normal
|
stats
|
d, p, q, r
|
norm
|
Normal
|
actuar
|
m, mgf
|
norm
|
Truncated normal
|
truncnorm
|
d, p, q, r, m
|
truncnorm
|
Truncated normal
|
mvrtn
|
r, m
|
tn
|
Truncated normal
|
EnvStats
|
d, p, q, r
|
normTrunc
|
Truncated normal
|
extraDistr
|
d, p, q, r
|
tnorm
|
Generalized normal
|
lmomco
|
d, p, q, r
|
gno
|
Zero modified Gaussian
|
EnvStats
|
d, p, q, r
|
zmnorm
|
Exponentially modified Gaussian
|
emg
|
d, p, q, r
|
emg
|
Exponentially modified Gaussian
|
gamlss.dist
|
d, p, q, r
|
exGAUSS
|
Exponentially modified Gaussian
|
retimes
|
d, p, q, r
|
exgauss
|
Folded and skew normal
|
gamlss.dist
|
d, p, q, r
|
SN1, SN2
|
Folded normal
|
greybox
|
d, p, q, r
|
fnorm
|
Closed skew normal
|
csn
|
d, p, q, r
|
csn
|
Skew normal
|
sn
|
d, p, q, r
|
sn
|
-
General error distribution (also known as exponential power distribution):
see
exponential
item.
-
Generalized extreme value distribution:
d, p, q provided in
lmomco;
d, p, q, r, provided in
VGAM,
evd,
evir,
FAdist,
extraDistr,
EnvStats,
TLMoments,
rmutil,
QRM, and
fExtremes.
evdbayes,
revdbayes
provide d,p,q,r functions of the GEV distribution in a Bayesian setting.
-
Gompertz distribution:
provided in
reliaR,
flexsurv,
extraDistr.
flexsurv
also
provides hazard (h) and integrated hazard rate (i) functions.
The shifted Gompertz distribution is implemented in
extraDistr.
-
Govindarajulu distribution:
provided in
lmomco.
-
Gumbel distribution:
provided in packages
lmomco,
VGAM,
gamlss.dist,
FAdist,
extraDistr,
reliaR,
QRM,
TLMoments,
EnvStats
and
evd.
actuar
provides the raw moments and the moment generating function (mgf)
in addition to the d, p, q, r functions.
A fast random generator is available for the Gumbel distribution
is implemented in
Runuran
as well as the density function.
The reverse Gumbel distribution is implemented in
lmomco
and
gamlss.dist.
-
Hjorth distribution:
provided in
rmutil.
-
Huber distribution:
Huber's least favourable distribution provided in package
smoothmest
(d, r),
and in
VGAM,
marg,
extraDistr
(d, p, q, r).
-
(generalized) G-and-K, G-and-H distributions:
gk
provides d, p, q, r functions for the g-and-k and generalized g-and-h
distributions which are nonlinear transforms of the Gaussian variables.
-
(generalized) Hyperbolic distribution:
fBasics,
ghyp,
GeneralizedHyperbolic
and
HyperbolicDist
packages
provide d, p, q, r functions for the generalized hyperbolic distribution.
QRM
provides d, r functions for the generalized hyperbolic distribution.
SkewHyperbolic
provides the skewed Hyperbolic Student t-Distribution.
fBasics
also implements the standardized generalized Hyperbolic distribution.
A fast random generator is available for the hyperbolic distribution
is implemented in
Runuran
as well as the density function.
-
Hyperbolic sine distribution and extension:
gamlss.dist
provides the sinh and the asinh distributions.
ihs
provides the asinh distribution.
Generalized Power Hyperbolic sine distributions are provided in
FatTailsR.
-
Inverse Gaussian (also known Wald) distribution:
d, p, q, and r functions of the inverse Gaussian are provided in
statmod,
extraDistr,
SuppDists,
rmutil
and
STAR.
LaplacesDemon
provides d, r functions for the inverse Gaussian distribution.
actuar
provides d, p, q, r, m, lev, mgf functions for the Inverse Gaussian
distribution.
SuppDists
also provides a function that returns moments, skewness, kurtosis.
fBasics
the normal inverse Gaussian and standardized
normal inverse Gaussian distributions.
The generalized inverse gaussian distribution can be found in
gamlss.dist,
QRM,
rmutil,
and
HyperbolicDist. A random generator is available for the (generalized)
Inverse Gaussian distribution is implemented in
Runuran
as well as the density function.
GIGrvg
generates random variables from the generalized inverse Gaussian distribution.
frmqa
computes p function of the generalized inverse Gaussian distribution.
-
Johnson distribution:
provided in
SuppDists.
-
Jones and Pewsey distribution:
provided in
circular
(d).
-
K-prime distribution:
sadists
implements Gram Charlier, Edgeworth and Cornish-Fisher approximations
for K-prime distribution for computing d, p, q, r functions.
-
Kappa distribution:
A 4-parameter Kappa distribution is provided in
lmomco
and
FAdist.
-
Kappa-mu distribution:
provided in
lmomco.
-
Kato-Jones distribution:
provided in
circular
(d, r).
-
Kendall's tau distribution:
provided in
SuppDists.
-
Kiener distribution:
a family of distributions generalizing hyperbolic sine distributions (see hyperbolic sine section),
d, p, q, r, m provided in
FatTailsR.
-
Kolmogorov distribution:
p function provided in
kolmim.
-
Kruskal Wallis distribution:
provided in
SuppDists.
-
Kumaraswamy distribution:
provided in packages
VGAM,
extraDistr
and
lmomco.
-
(Tukey) Lambda distribution and its extensions:
The generalized Lambda distribution (GLD) is well known for its wide range of shapes.
The original Tukey Lambda distribution can be obtained as a special
case of the generalized Lambda distribution.
There exists different parametrization of GLD in the literature:
RS (Ramberg-Schmeiser or tail-index param),
FMKL (Freimer-Mudholkar-Kollia-Lin),
FM5 (Five-parameter version of FKML by Gilchrist),
GPD (gen. Pareto dist.)
and AS (Asymmetry-steepness). The following packages implement such distributions
(with d, p, q, r functions):
gld
(RS, FKML, FM5, GPD),
Davies
(RS),
gb
(RS),
lmomco
(FMKL),
extraDistr
(original Tukey).
ecd
provides the elliptic lambda distribution and its use for
financial pricing.
-
Tukey's H distribution:
provided as a special case of
Lambert W x F distribution.
-
Lambda-prime distribution:
sadists
implements Gram Charlier, Edgeworth and Cornish-Fisher approximations
for K-prime distribution for computing d, p, q, r functions.
-
Lambert W x F distribution:
LambertW
package provides
d, p, q, r functions as well as the first 4 central moments and a qqplot.
-
Laplace (also called double exponential distribution)
and asymmetric Laplace distribution:
provided in
distr,
lmomco,
LaplacesDemon,
VGAM,
sgt,
extraDistr,
greybox,
rmutil
and
HyperbolicDist
packages.
LaplacesDemon
provides the Laplace distribution parametrized
by the precision parameter as well as the skew Laplace distribution.
Asymetric Laplace distribution is implemented in
ald,
greybox.
A fast random generator is available for the Laplace distribution
is implemented in
Runuran
as well as the density function.
smoothmest
implements the density and the random generator.
The skew Laplace distribution is available in
sgt.
LaplacesDemon
provides the log-Laplace distribution.
-
LASSO distribution:
provided in
LaplacesDemon.
-
Lévy distribution:
provided in
rmutil.
-
Lindley distribution:
provided in
VGAM
and
gambin.
-
Linear failure rate distribution:
provided in
reliaR.
-
Loglog distribution:
provided in
reliaR
-
Lomax distribution:
see beta.
-
Logistic distribution and its extensions:
Base R provides
the d, p, q, r functions for this distribution (see above).
actuar
and
VGAM
provide d, p, q, r functions for
the log logistic (also called Fisk), the paralogistic and
the inverse paralogistic distributions.
FAdist
the log-logistic distribution with two and three parameters.
The generalized logistic distribution (Type I, also known as skew-logistic distribution)
is provided in
lmomco,
sld,
rmutil,
SCI
and
glogis.
Summary for Logistic-related distributions
Distribution name
|
Packages
|
Functions
|
Distribution suffix
|
Logistic
|
stats
|
d, p, q, r
|
logis
|
Logistic
|
actuar
|
m, mgf
|
logis
|
Log logistic
|
actuar
|
d, p, q, r, m, lev
|
llogis
|
Log logistic
|
VGAM
|
d, p, q, r
|
fisk
|
Log logistic
|
FAdist
|
d, p, q, r
|
llog, llog3
|
Paralogistic
|
actuar
|
d, p, q, r, m, lev
|
paralogis
|
Paralogistic
|
VGAM
|
d, p, q, r
|
paralogistic
|
Inv. paralogistic
|
actuar
|
d, p, q, r, m, lev
|
invparalogis
|
Inv. paralogistic
|
VGAM
|
d, p, q, r
|
inv.paralogistic
|
Generalized logistic
|
glogis
|
d, p, q, r
|
glogis
|
Generalized logistic
|
SCI
|
d, p, q
|
genlog
|
Generalized logistic
|
lmomco
|
d, p, q, r
|
glo
|
Generalized logistic
|
sld
|
d, p, q, r
|
sl
|
Generalized logistic
|
rmutil
|
d, p, q, r
|
glogis
|
-
Logit-normal distribution:
provided in
logitnorm.
-
Log-normal distribution and its extensions:
The log normal distribution is implemented in Base R (see above)
and
poweRlaw.
The log normal distribution parametrized by its mean and
its coefficient of variation is also provided in
EnvStats.
LaplacesDemon
provides the lognormal parametrized by
the precision parameter.
The truncated lognormal distribution is provided in
EnvStats
with two possible parametrizations as well as in
ReIns.
The 3-parameter lognormal distribution is available in
lmomco,
greybox,
TLMoments,
EnvStats
and
FAdist.
The package
loglognorm
implements d, p, q, r functions for the double lognormal distribution,
as well as the raw moment, the expected value and the variance functions.
EnvStats
provides d, p, q, r functions for the zero-modified lognormal
distribution with two possible parametrizations.
-
Makeham distribution:
provided in
VGAM
and
-
Maxwell distribution:
provided in
VGAM.
-
Minimax distribution:
provided in
minimax.
-
Mittag-Leffler distribution:
d, p, q, r functions
provided in
MittagLeffleR.
-
Nakagami distribution:
provided in
VGAM.
-
Pareto distribution:
d, p, q, r functions are implemented in
VGAM
for the Pareto distribution type IV (which includes Burr's distribution,
Pareto type III, Pareto type II (also called the lomax distribution) and
Pareto type I) and the (upper/lower) truncated Pareto distribution.
In an actuarial context,
actuar
provides d, p, q, r functions as well as moments and
limited expected values for the Pareto I and II, the inverse Pareto, the 'generalized pareto'
distributions, the Burr and the inverse Burr distributions, all special cases of the
transformed beta II distribution.
A fast random generator for the
Burr and the Pareto II distribution is implemented in
Runuran
as well as the density.
EnvStats
and
LaplacesDemon
provides d, p, q, r functions for Pareto I distribution.
extremefit
provides the Burr, the Pareto II, mixture of Pareto I distributions
and a composite distribution of two Pareto I distributions.
lmomco,
evd,
fExtremes,
extraDistr,
QRM,
Renext,
revdbayes,
FAdist,
LaplacesDemon,
TLMoments
qrmtools
and
evir
packages
implement the Generalized Pareto Distribution (from Extreme Value Theory), which is
depending the shape parameter's value a Pareto II distribution,
a shifted exponential distribution or a generalized beta I distribution.
ParetoPosStable
implements the Pareto positive stable distribution.
The extended Pareto distribution is implemented in
RTDE
and the shifted truncated (to unit interval) Pareto is implemented in
mbbefd.
ReIns
provides Burr, extended Pareto, generalized Pareto, Pareto 1
distributions and their truncated version.
Summary for Pareto-related distributions
Distribution name
|
Packages
|
Functions
|
Distribution suffix
|
Pareto I
|
VGAM
|
d, p, q, r
|
paretoI
|
Pareto I
|
actuar
|
d, p, q, r, m, lev
|
pareto1
|
Pareto I
|
EnvStats
|
d, p, q, r
|
pareto
|
Pareto I
|
extraDistr
|
d, p, q, r
|
pareto
|
Pareto I
|
ReIns
|
d, p, q, r
|
pareto
|
Pareto I
|
LaplacesDemon
|
d, p, q, r
|
pareto
|
Trunc. Pareto I
|
ReIns
|
d, p, q, r
|
tpareto
|
Pareto II
|
VGAM
|
d, p, q, r
|
paretoII
|
Pareto II
|
actuar
|
d, p, q, r, m, lev
|
pareto, pareto2
|
Pareto II
|
Runuran
|
d, r
|
pareto
|
Pareto II
|
extraDistr
|
d, p, q, h
|
lomax
|
Pareto II
|
extremefit
|
d, p, q, h
|
pareto
|
Pareto II
|
Renext
|
d, p, q, r
|
lomax
|
Pareto II
|
rmutil
|
d, p, q, r
|
pareto
|
Pareto III
|
VGAM
|
d, p, q, r
|
paretoIII
|
Pareto IV
|
VGAM
|
d, p, q, r
|
paretoIV
|
Inverse Pareto
|
actuar
|
d, p, q, r, m, lev
|
invpareto
|
Extended Pareto
|
RTDE
|
d, p, q, r
|
EPD
|
Extended Pareto
|
ReIns
|
d, p, q, r
|
epd
|
Shift. trunc. Pareto
|
mbbefd
|
d, p, q, r, m, ec
|
stpareto
|
Gen. Pareto (actuarial)
|
actuar
|
d, p, q, r, m, lev
|
genpareto
|
Gen. Pareto (EVT)
|
lmomco
|
d, p, q, r
|
gpa
|
Gen. Pareto (EVT)
|
evd
|
d, p, q, r
|
gpd
|
Gen. Pareto (EVT)
|
fExtremes
|
d, p, q, r
|
gpd
|
Gen. Pareto (EVT)
|
evir
|
d, p, q, r
|
gpd
|
Gen. Pareto (EVT)
|
extraDistr
|
d, p, q, r
|
gpd
|
Gen. Pareto (EVT)
|
QRM
|
d, p, q, r
|
GPD
|
Gen. Pareto (EVT)
|
ReIns
|
d, p, q, r
|
gpd
|
Gen. Pareto (EVT)
|
LaplacesDemon
|
d, r
|
gpd
|
Gen. Pareto (EVT)
|
TLMoments
|
d, p, q, r
|
gpd
|
Trunc. Gen. Pareto (EVT)
|
ReIns
|
d, p, q, r
|
tgpd
|
Gen. Pareto (EVT)
|
revdbayes
|
d, p, q, r
|
gp
|
Gen. Pareto (EVT)
|
Renext
|
d, p, q, r
|
GPD
|
Gen. Pareto (EVT)
|
qrmtools
|
d, p, q, r
|
GPD
|
Burr
|
actuar
|
d, p, q, r, m, lev
|
burr
|
Burr
|
extremefit
|
d, p, q, r
|
burr
|
Burr
|
ReIns
|
d, p, q, r
|
burr
|
Burr
|
rmutil
|
d, p, q, r
|
burr
|
Trunc. Burr
|
ReIns
|
d, p, q, r
|
tburr
|
Inverse Burr
|
actuar
|
d, p, q, r, m, lev
|
invburr
|
-
Pearson's distribution:
Pearson type III available
in
lmomco
and
FAdist.
A log-Pearson type III distribution is also available in
FAdist.
PearsonDS
provides the d, p, q, r functions as well as the first
four moments for the Pearson distributions: types I, II, III, IV, V, VI, VII.
-
Pearson's Rho distribution:
provided in
SuppDists.
-
Perks distribution:
provided in
VGAM.
-
Planck's distribution:
a random generator is available in
Runuran.
-
Phase-type distribution:
provided in
actuar
-
Poisson subordinated distributions:
provided in
LIHNPSD
(d, p, q, r, m functions).
-
Power distribution:
reliaR
and
poweRlaw
implement the
exponential power distribution.
Two-sided power distribution provided in
rmutil.
-
Proportion distribution:
this is the distribution for the difference
between two independent beta distributions. d, p, q, r functions in
tolerance.
-
Rayleigh distribution:
provided in packages
VGAM,
extraDistr
and
lmomco. Generalized and logistic Rayleigh distributions are available in
reliaR.
-
Response time distribution:
rtdists
provides d, p, q, r functions for the (Ratcliff) diffusion distribution and
for the linear ballistic accumulator (LBA) with different underlying
drift-distributions (Normal, Gamma, Frechet, and log-normal).
-
Rice distribution:
provided in
VGAM
and
lmomco.
-
Simplex distribution:
provided in
rmutil.
-
Singh-Maddala distribution:
see beta.
-
Slash distribution:
provided in
lmomco,
extraDistr
and
VGAM.
-
Spearman's Rho distribution:
provided in
SuppDists.
-
Stable distribution:
d, p, q, r functions are available in
fBasics
and
stabledist, the functions use the approach of J.P. Nolan
for general stable distributions.
MixedTS
provides mixed tempered
stable distribution (d, p, q, r).
FMStable
provides (d, p, q) the extremal or maximally skew stable and
the finite moment log stable distributions.
-
Student distribution and its extensions:
Base R provides
the d, p, q, r functions for Student and non central Student distribution (see above).
extraDistr
and
LaplacesDemon
provides the Student distribution with location and scale parameters.
LaplacesDemon
provides d, p, q, r functions for the Half-Student
distribution.
sadists
implements Gram Charlier, Edgeworth and Cornish-Fisher approximations
for doubly non central Student distribution for computing d, p, q, r functions.
The skewed Student distribution is provided in
skewt,
sn
and
gamlss.dist
packages.
The generalized skew distribution is provided in
sgt.
d, p, q, r functions for the generalized t-distribution
can be found in
gamlss.dist.
fBasics
provides d, p, q, r functions
for the skew and the generalized hyperbolic t-distribution.
The L-moments of the Student t (3-parameter) are provided in
lmomco.
Summary for Student-related distributions
Distribution name
|
Packages
|
Functions
|
Distribution suffix
|
Student
|
stats
|
d, p, q, r
|
t
|
Student with loc. and scal.
|
extraDistr
|
d, p, q, r
|
lst
|
Student with loc. and scal.
|
LaplacesDemon
|
d, p, q, r
|
st
|
Doubly non central St.
|
sadists
|
d, p, q, r
|
dnt
|
Skew Student
|
skewt
|
d, p, q, r
|
skt
|
Skew Student
|
sn
|
d, p, q, r
|
st
|
Skew St. Type 1-5
|
gamlss.dist
|
d, p, q, r
|
ST1, ST2, ST3, ST4, ST5
|
Gen. Student
|
gamlss.dist
|
d, p, q, r
|
GT
|
Gen. Hyp. Student
|
fBasics
|
d, p, q, r
|
ght
|
Skew Gen. Student
|
sgt
|
d, p, q, r
|
sgt
|
-
Triangle/trapezoidal distribution:
packages
triangle,
extraDistr,
mc2d,
EnvStats
and
VGAM
provide d, p, q, r functions for the triangle or triangular distribution,
while the package
trapezoid
provides d, p, q, r functions for the Generalized
Trapezoidal Distribution.
CircStats,
circular
provide d, r functions for triangular distribution.
A fast random generator is available for the triangle distribution
is implemented in
Runuran
as well as the density function.
-
Tsallis or q-Exponential distribution:
tsallisqexp
provides d, p, q, r functions for two parametrizations of
the Tsallis distribution and also implements a left-censored version.
-
Tweedie distribution:
the Tweedie distribution is implemented
in package
tweedie. Let us note that the Tweedie distribution
is not necessarily continuous, a special case of it is the Poisson distribution.
-
Uniform distribution:
d, p, q, r functions are of course provided
in R. See section RNG for random number generation topics.
HI
generates
uniformly random points on a bounded convex set, in particular the unit ball.
KScorrect
provides d, p, q, r functions for the log-uniform distribution.
-
Upsilon distribution:
sadists
implements Gram Charlier, Edgeworth and Cornish-Fisher approximations
for Upsilon distribution for computing d, p, q, r functions.
-
von Mises distribution:
The
CircStats
package provides d, p, r functions;
the
circular
package provides d, p, q, r functions.
-
Wakeby distribution:
A 5-parameter Wakeby is provided in
lmomco.
-
Weibull distribution and its extensions:
Base R provides
the d, p, q, r functions for this distribution (see above).
The inverse Weibull is provided in
actuar
package and also the moments
and the limited expected value for both the raw and the inverse Weibull distribution.
FAdist
implements the three-parameter Weibull distribution, while
reliaR
implements the exponential Weibull, the flexible Weibull,
the generalized power weibull, the Marshall-Olkin Extended Weibull and
the Weibull extension distributions.
Furthermore,
lmomco
implements the Weibull distribution while
evd
implements the reverse Weibull distribution.
The reverse generalized extreme value distribution are provided in
gamlss.dist
(d, p, q, r) and the shifted left truncated Weibull distribution
is provided in
Renext.
The right truncated Weibull is provided in
ReIns.
The generalized Weibull is provided in
rmutil.
The tail Weibull is provided in
distTails.
-
Bivariate normal:
d, p functions provided in
bivariate.
-
Bivariate Pareto:
Bivariate.Pareto
provides a random generator for the bivariate Pareto distribution.
-
Bivariate uniform:
d, p functions provided in
bivariate.
-
Multivariate Cauchy distribution:
sn
provide d, p, r functions for the multivariate skew Cauchy distribution,
while
LaplacesDemon
provides d, r functions for the multivariate
Cauchy distribution parametrized either by sigma,
by the Cholesky decomposition of sigma, by the precision matrix
omega or by the Cholesky decomposition of omega.
-
Dirichlet distribution:
Compositional,
LaplacesDemon,
MCMCpack
packages
provide d, r functions as well as a fitting function for
Compositional.
compositions,
bayesm
provide r function.
bivariate
provides d function for the trivariate Dirichlet.
-
Multivariate exponential distribution:
while
LaplacesDemon
provides d, r functions for the multivariate
power exponential distribution parametrized either by sigma,
or by the Cholesky decomposition of sigma.
-
Multivariate Gaussian (or normal) distribution:
The multivariate Gaussian distribution is provided in the packages
mvtnorm
(d, p, r),
mnormt
(d, p, r),
Compositional
(r),
compositions
(r).
pbv
provides d, p functions for bivariate normal distributions.
mvprpb
computes the orthant probability of the multivariate Gaussian distribution.
symmoments
computes central and non-central moments of the multivariate Gaussian distribution.
LaplacesDemon
provides d, r functions for the multivariate
normal distribution parametrized either by sigma,
by the Cholesky decomposition of sigma, by the precision matrix
omega or by the Cholesky decomposition of omega.
Futhermore, the multivariate truncated normal is implemented in
TruncatedNormal
for d, p, r functions;
tmvtnorm
for p, q, r, m(oments) functions;
tmvmixnorm
for a fast RNG.
sparseMVN
implements very
fast algorithms to compute the density and generate random variates of
a multivariate normal distribution for which the covariance matrix or precision matrix is sparse.
cmvnorm
implements the complex multivariate normal distribution (d, r).
Finally,
condMVNorm
implements d, p, r functions for the conditional multivariate
normal distribution.
Furthermore,
sn
besides providing facilities for their distribution functions,
sn
allows the creation of S4 objects which encapsulate these distributions and provide
facilities for plotting, summary, marginalization, conditioning, affine transformations
of these S4 objects.
mnormpow
computes the expected product of the components of a multivariate Gaussian vector.
Compositional
provides random generator for the multivariate normal
distribution on the simplex and multivariate skew normal distribution on the simplex.
A random generator of the multivariate normal is provided in
MultiRNG.
-
Multivariate generalized hyperbolic distribution:
QRM
provides d, r functions of the standard and
the symmetric multivariate generalized hyperbolic distribution.
ghyp
provides d, p, r functions of the standard
multivariate generalized hyperbolic distribution.
-
Multivariate generalized extreme value distribution:
Both bivariate and multivariate Extreme Value distributions
as well as order/maxima/minima distributions
are implemented in
evd
(d, p, r).
-
Multivariate Laplace distribution:
LaplacesDemon
provides d, r functions for the multivariate
Laplace distribution parametrized either by sigma,
or by the Cholesky decomposition of sigma.
r is provided in
MultiRNG.
-
Multivariate logistic distribution:
VGAM
package implements the bivariate logistic distribution.
-
Multivariate lognormal distribution:
compositions
provides r function.
-
Multivariate Pareto distribution:
mgpd
provides the density for the multivariate generalized Pareto distribution
of type II, while
evd
provides the density for type I.
-
Multivariate Stable distribution:
not yet implemented?
-
Multivariate Student distribution:
The multivariate Student distribution is provided in the packages
mvtnorm
(d, r),
mnormt
(d, p, r),
Compositional
(r),
tmvmixnorm
(r),
QRM
(d, r),
bayesm
(r).
The multivariate truncated student is implemented in
TTmoment
for r (sampling) and moments (m);
TruncatedNormal
for d, p, r functions;
tmvtnorm
for d, p, q, r functions.
sn
provides d, p, r functions for the multivariate skew t distribution.
LaplacesDemon
provides d, r functions for the multivariate
Student distribution parametrized either by sigma,
by the Cholesky decomposition of sigma, by the precision matrix
omega or by the Cholesky decomposition of omega.
Random generator r is provided in
MultiRNG.
A special case of a bivariate noncentral t-distribution called Owen distribution
is provided in
OwenQ.
-
Multivariate Uniform distribution:
r is provided in
MultiRNG.
compositions
provides a random generator
on the simplex.
-
Maxwell-Boltzmann-Bose-Einstein-Fermi-Dirac (MBBEFD) distribution :
provided in
mbbefd.
-
Mixed ordinal and normal distribution:
provided in
OrdNor.
-
One-inflated distributions:
a generic distribution as well as special cases (OI-beta, OI-uniform, OI-GB1, OI-Pareto)
are provided in
mbbefd.
The zero and one inflated beta distribution can be found in
gamlss.dist.
-
Zero-modified distributions:
EnvStats
provides the zero-modified normal distribution
and the zero-modified lognormal distribution.
-
Bernoulli-dist mixture:
d, p, q, r functions
for Bernoulli-exponential, Bernoulli-Gamma, Bernoulli-lognormal,
Bernoulli-Weibull distributions are provided in
qmap.
-
Cauchy-polynomial quantile mixture:
d, p, q, r functions are
provided in
Lmoments.
-
Chi-square mixture:
d, p, q, r functions are
provided in
emdbook.
-
Gaussian mixture:
Functions d, r are provided in
mixtools,
bmixture
package when dealing with finite mixture models.
nor1mix,
extraDistr,
mclust,
LaplacesDemon,
KScorrect
provides d, p, r functions for Gaussian mixture.
EnvStats
provides d, p, q, r functions
for mixture of two normal distributions.
bayesm
provides d function for the mixture of multivariate normals.
-
Gamma Poisson:
provided in
extraDistr.
-
Gamma mixture:
Ga
GSM
package provides d, p, r,
bmixture
provides d, r,
evmix
provides d, p, q, r.
-
Generic mixtures:
there is an implementation via S4-class
UnivarMixingDistribution in package
distr.
gamlss.mx
uses the
gamlss.dist
package.
gendist
provides d, p, q, r functions for two-distribution mixture
models working with any distribution defined by its d, p, q, r functions.
-
Horseshoe distribution:
provided in
LaplacesDemon.
-
Laplace mixture distribution:
provided in
LaplacesDemon.
-
Log normal mixture:
d, p, q, r functions are provided
in
EnvStats
with two possible parametrizations.
-
Normal-polynomial quantile mixture:
d, p, q, r functions are
provided in
Lmoments.
-
Pareto distribution:
extremefit
implements
the mixture of two Pareto I distributions.
-
Poisson Binomial distribution:
poibin
implements
the Poisson Binomial distribution.
-
Poisson lognormal distribution:
poilog
implements
the Poisson lognormal distribution.
-
Poisson mixture:
provided in
extraDistr.
-
Poisson-Tweedie exponential family models:
provided in
poistweedie.
-
Student mixture:
The
AdMit
package provides d, r functions
for Student mixtures in the context of Adaptive Mixture of Student-t distributions.
MitISEM,
bmixture
package also provide d, r functions for mixture of Student-t distributions.
-
von Mises Fisher (or Langevin) mixture:
The
movMF
and
CircStats
packages provide d, r functions
for finite von Mises Fisher mixtures.
-
Absolute value or half distribution:
Half-Cauchy, half normal and half-student are implemented
both in
extraDistr
and in
LaplacesDemon.
-
Composite distribution also known as spliced distribution:
Composite lognormal distributions provided in
CompLognormal.
Split-normal (also known as the two-piece normal distribution) not yet implemented.
Split-student provided in package
dng.
evmix
provides d, p, q, r of the following composite distributions:
gamma-GPD, lognormal GPD, normal-GPD, Weibull-GPD
as well as bulk models such as GPD-normal-GPD distribution.
gendist
provides d, p, q, r functions for composite models
working with any distribution defined by its d, p, q, r functions.
-
Compound distribution:
d, p, q, r, m functions are implemented by
Compounding
where the parent distribution is any continuous distribution and the compound distribution
is any distribution among the list: binomial, binomial-Poisson, geometric, hypergeometric,
hyper-Poisson, Katti type H1/H2, logarithmic, logarithmic-binomial,
logarithmic-Poisson, negative binomial, Neyman type A/B/C, Pascal-Poisson, Poisson,
Poisson-binomial, Poisson-Lindley, Poisson-Pascal, Polya Aeppli, Thomas,
Waring, Yule.
kdist
provides d, p, q, r functions of the K distribution.
-
Discretized distribution:
distcrete
allows discretised versions of continuous distribution by mapping
continuous values to an underlying discrete grid, based on a (uniform) frequency of
discretisation, a valid discretisation point, and an integration range.
-
transformed distribution:
Newdistns
provides G-transformed distributions
for a selected number of distributions
which includes Marshall Olkin G distribution, exponentiated G distribution,
beta G distribution, gamma G distribution, Kumaraswamy G distribution,
generalized beta G distribution, beta extended G distribution, gamma G distribution,
gamma uniform G distribution, beta exponential G distribution, Weibull G distribution,
log gamma G1/G2 distribution, exponentiated generalized G distribution,
exponentiated Kumaraswamy G distributions, geometric exponential Poisson
G distribution, truncated-exponential skew-symmetric G distribution, modified beta
G distribution, and exponentiated exponential Poisson G distribution.
gendist
provides d, p, q, r functions for composite models, folded models,
skewed symmetric models and arctan models working with any distribution
defined by its d, p, q, r functions.
-
Truncated distribution:
A generic code snippet is available
in the JSS
.
This code is now available in two packages:
truncdist
is a dedicated package providing d, p, q, r, m(oments)
functions for a univariate truncated distribution given a user-supplied
distribution;
LaplacesDemon
provides a generic function in a Bayesian environment.
-
Wrapped G distribution:
Wrapped
provides d, p, q, r functions for a large family of distributions.
-
Empirical mean, standard deviation and variance:
base R provides
mean(),
sd(),
var()
functions to compute
the mean, standard deviation and variance, respectively.
-
Empirical skewness:
available in
agricolae,
e1071,
GLDEX,
HyperbolicDist,
modeest,
moments,
s20x,
fromo,
DistributionUtils,
EnvStats,
parameters
packages.
-
Empirical kurtosis:
available in
agricolae,
DistributionUtils,
e1071,
EnvStats,
GLDEX,
HyperbolicDist,
fromo,
moments,
parameters
packages.
The raw or centered moments are provided in
e1071,
moments.
-
Empirical L-moments:
L-moments are available in
lmom,
lmomco,
Lmoments,
GLDEX,
EnvStats,
trimmed L-moments are available in
lmomco,
TLMoments
and
Lmoments,
right-censored L-moments are available in
lmomco,
and cumulants in
GLDEX.
TLMoments
provides a function to convert them to some
distribution parameters.
-
Empirical probability weighted moments:
Probability weighted moments are available in
EnvStats
and
fromo.
-
Empirical cumulants:
fromo
provides centered and standardized cumulants.
-
Mode estimation:
Package
modeest
provides mode estimation for various distributions.
-
Order statistics:
Distribution function of the jth order statistic can be obtained with base R functions.
ORDER2PARENT
transforms distribution function of order statistics to its parent
distribution function.
-
Empirical characteristic function:
empichar
evaluates the empirical characteristic function of
univariate and multivariate samples.
-
Theoretical moments:
-
common distributions:
The
actuar
package implements raw moments, limited expected values
and moment generating function for base R distributions.
lmomco
provides L-moments (L), trimmed L-moments (TL),
and right-censored [RC] for
the following distributions: Asymmetric Exponential Power (L), Cauchy (TL), Eta-Mu (L),
Exponential (L), Gamma (L), Generalized Extreme Value (L), Generalized Lambda (L and TL),
Generalized Logistic (L), Generalized Normal (L), Generalized Pareto (L[RC] and TL),
Govindarajulu (L), Gumbel (L), Kappa (L), Kappa-Mu (L), Kumaraswamy (L), Laplace (L),
Normal (L), 3-parameter log-Normal (L), Pearson Type III (L), Rayleigh (L), Reverse Gumbel
(L[RC]), Rice/Rician (L), Slash (TL), 3-parameter Student T (L), Truncated Exponential
(L), Wakeby (L), and Weibull (L). Multivariate L-moments (L-comoments).
-
hyperbolic distributions:
HyperbolicDist
provides the mean, variance, skewness, kurtosis, mode,
raw and centered moments for the hyperbolic, the generalized hyperbolic and the
generalized inverse Gaussian distributions.
-
Lambda distribution:
GLDEX
also provides the mean, variance, skewness,
kurtosis of generalized Lambda distribution.
-
Normal distribution:
mvrtn
provides mean, variance for left/right truncated normal distributions.
-
multivariate distributions:
MomTrunc
provides mean vector, covariance matrices and
raw moments for truncated or folded of the following multivariate
distributions: normal, skew normal, extended skew normal and student.
-
Huang-Wan distribution:
provided in
LaplacesDemon.
-
Inverse matrix gamma distribution:
provided in
LaplacesDemon.
-
Inverse Wishart distribution:
LaplacesDemon
provides inverse Wishart distribution
parametrized either by Sigma or by its Cholesky
decomposition.
LaplacesDemon
provides the scaled inverse
Wishart distribution.
MCMCpack
provides the inverse Wishart distribution.
-
Marcenko-Pastur distribution:
provided in
RMTstat,
MCMCpack
and
bayesm.
-
Matrix gamma distribution:
provided in
LaplacesDemon.
-
Matrix normal distribution:
MBSP
(r) provides a random generator using a Cholesky decomposition;
matrixsampling
(r) provides a random generator using a spectral decomposition;
LaplacesDemon
(d, r);
matrixNormal
(d, p, r) collects these forms in one place and allows
users to be flexible in simulating random variates (Cholesky, spectral, SVD).
-
Normal Inverse Wishart distribution:
provided in
LaplacesDemon.
-
Normal Wishart distribution:
provided in
LaplacesDemon.
-
Tracy-Widom distribution:
provided in
RMTstat,
MCMCpack
and
bayesm: supported beta values
are 1 (Gaussian Orthogonal Ensemble), 2 (Gaussian Unitary Ensemble),
and 4 (Gaussian Symplectic Ensemble).
-
Sparse matrix:
spam
provides functionalities to draw random numbers
from a user-supplied RNG (e.g.
rexp) or from a
multivariate normal distribution for large sparse matrices: typically
for sparse covariance matrices.
-
Spiked Wishart Maximum Eigenvalue Distribution:
provided in
RMTstat,
MCMCpack
and
bayesm.
-
Wishart distributions:
Base R provides the r function for the Wishart distribution.
MCMCpack,
RMTstat,
bayesm
provides d, r functions,
bayesm
provides r function.
LaplacesDemon
provides Wishart distribution
parametrized either by Sigma or by its Cholesky
decomposition.
-
White Wishart Maximum Eigenvalue Distribution:
provided in
RMTstat,
MCMCpack
and
bayesm.
-
Yang-Berger distribution:
provided in
LaplacesDemon.
-
Zellner distribution:
provided in
LaplacesDemon.
-
Unified approaches:
The packages
fCopulae,
copula, and
copBasic
provide a lot of
general functionality for copulas. Although lacking support for
many existing copulas themselves,
copBasic
is primarily oriented
around utility functions for the general mathematics of copulas
as described in the well known introduction to copulas by Nelsen.
-
Archimedean copulas:
gumbel
is a standalone package for the Gumbel copula
fCopulae
implements the 22 Archimedean
copulas of Nelsen (1998,
Introduction to Copulas
, Springer-Verlag) including
Gumbel, Frank, Clayton, and Ali-Mikhail-Haq.
VGAM
provides Ali-Mikhail-Haq, Clayton, Frank, Frechet copulas.
copula
provides Ali-Mikhail-Haq, Clayton, Frank, Gumbel and Joe copulas.
The Frank bivariate distribution is available in
RTDE.
CDVine
and
VineCopula
provide
Clayton, Gumbel, Frank, Joe, BB1, BB6, BB7 and BB8 copulas.
Nested Archimedean copulas are available in the
HAC
package.
Generalized Archimedean copulas are implemented in the
fgac
package.
BivarP
provides cdf, pdf and survival function for Clayton, Gumbel and Frank copula.
copBasic
provides functions for Ali-Mikhail-Haq, Clayton, Frechet copulas.
QRM
provides pdf and random generator for Clayton, Gumbel, Frank, BB9 copula.
Bivariate.Pareto
provides a random generator for the Frank copula with Pareto margins.
nCopula
provides hierarchical archimedean copulas.
lcopula
provides the Liouville copula.
-
Blomqvist copula:
provided in
copBasic.
-
Composition of copula:
copBasic
provides functions
for composition of a single symmetric copula and composition of two copulas.
-
Cubic copula:
Not yet implemented?
-
Dirichlet copula:
Not yet implemented?
-
Empirical copula:
provided in
copBasic
and in
HAC.
GenOrd
provides sampling function for multivariate discrete random vectors
with a specified correlation matrix.
-
Elliptical copulas:
Gaussian, Student and Cauchy copulas are implemented in
fCopulae
for the bivariate cases.
copula,
CDVine,
VGAM,
VineCopula
provide the Gaussian and the Student copulas.
QRM
provides pdf and random generator for Gaussian, Student copulas.
-
Extreme value copulas:
fCopulae
provides the following copulas
Gumbel, Galambos, Husler-Reiss, Tawn, or BB5.
copula
implements
Gumbel, Galambos and Husler-Reiss.
-
Eyraud-Farlie-Gumbel-Morgenstern copula:
provided in
VGAM,
RTDE,
and
copula.
-
Mardia copula:
Not yet implemented?
-
Nested copulas:
arbitrary nested versions of copulas can
be implemented in
copula.
-
Plackett:
provided in
VGAM,
copBasic
and
copula.
-
Vine copulas:
Packages
CDVine,
vines
provide functions for C- and D-vine copulas and
VineCopula
for general R-vine copulas.
-
Basic functionality:
R provides several random number generators (RNGs).
The random seed can be provided via
set.seed
and the kind of RNG can be specified
using
RNGkind. The default RNG is the Mersenne-Twister algorithm.
Other generators include Wichmann-Hill, Marsaglia-Multicarry, Super-Duper,
Knuth-TAOCP, Knuth-TAOCP-2002, as well as user-supplied RNGs. For normal
random numbers, the following algorithms are available: Kinderman-Ramage,
Ahrens-Dieter, Box-Muller, Inversion (default). In addition to the tools above,
setRNG
provides an easy way to set, retain information about the setting, and reset the RNG.
-
Pseudo-randomness:
RDieHarder
offers several dozen new RNGs
from the GNU GSL.
randtoolbox
provides
more recent RNGs such as SF Mersenne-Twister and WELL,
which are generators of Mersenne Twister type, but with
improved quality parameters.
rngwell19937
provides one of the WELL generators with 53 bit
resolution of the output and allows seeding by a vector
of integers of arbitrary length.
randaes
provides the deterministic part of the Fortuna cryptographic
pseudorandom number generator (AES).
SuppDists
implements two RNGs of G. Marsaglia.
dqrng
provides PCG family by O'Neill (2014) as well as Xoroshiro128+ and Xoshiro256+
by Blackman and Vigna (2018).
-
Support for several independent streams:
rstream
focuses on multiple independent streams of random numbers
from different sources (in an object oriented approach).
dqrng
provides RNG for parallel computation either in R
or in C++.
-
For non-uniform generation, the
Runuran
package interfaces to the UNU.RAN library for universal non-uniform generation
as well as customised distributions based on polynomial interpolation of the inverse
cumulative distribution function.
rust
performs non-uniform random variate generation from unimodal
(low-dimensional) multivariate continuous distributions, using the
generalized ratio-of-uniforms method.
UnivRNG
provides 17 non-uniform generators either using an
acceptance/rejection algorithm or the inverse CDF method.
MultiRNG
provides 11 multivariate generators, see each distribution.
-
kernelboot
provides functions for random generation from univariate
and multivariate kernel densities (in particular multivariate Gaussian kernels).
-
Quasi-randomness:
The
randtoolbox
provides
the following quasi random sequences: the Sobol sequence, the Halton
(hence Van Der Corput) sequence and the Torus sequence (also known as Kronecker
sequence).
lhs
and
mc2d
packages implement the latin hypercube sampling,
an hybrid quasi/pseudo random method.
sfsmisc
also provides
the Halton sequence.
qrng
provides Korobov, generalize Halton and Sobol quasi-random sequences.
-
True randomness:
The
random
package provides several functions that access the
true random number service at
random.org
.
The
qrandom
provides the ANU Quantum Random Number Generator provided
by the Australian National University (based on measuring the quantum fluctuations
of the vacuum).
-
RNG tests:
RDieHarder
offers
numerous tests of RNGs based on a
reimplementation and extension of Marsaglia's DieHarder battery.
randtoolbox
provides basic RNG tests.
-
Parallel computing:
Random-number generators for parallel computing are available via
the
rlecuyer
package.
See the
HighPerformanceComputing
task view for more details.
-
Computation:
-
Approximation of d, p, q, r functions:
PDQutils
provides tools for computing the density, cumulative distribution,
and quantile functions of a distribution when the cumulants or moments are given,
using the classical Gram Charlier, Edgeworth and Cornish-Fisher approximations.
sadists
is a showcase for PDQutils, providing density, cumulative distribution,
quantile, and random generation for the doubly non-central t, doubly non-central F,
K-prime, Lambda-prime, Upsilon, and sum of (non-central) chi-squares to powers
distributions.
-
For non-uniform generation, see the
Runuran
above.
-
Benchmark:
A set of 28 densities suitable for comparing
nonparametric density estimators in simulation studies can be found
in the
benchden
package. The densities vary greatly in degree of
smoothness, number of modes and other properties. The package
provides d,p,q and r functions.
-
Non parametric models:
-
Binned Empirical distributions:
The
HistogramTools
package
provides a number of methods for manipulating empirical data that has
been binned into histogram form, including: (1) the empirical
cumulative distribution function, (2) the empirical quantile, and (3)
information loss metrics associated with binning.
-
Empirical distribution:
Base R provides functions for univariate analysis:
(1) the empirical density (see density()), (2) the empirical cumulative
distribution function (see ecdf()), (3) the empirical quantile (see quantile())
and (4) random sampling (see sample()).
mded
provides a function for measuring the difference between two
independent or non-independent empirical distributions and returning a
significance level of the difference.
MEPDF
provides functions to compute and
visualize empirical density functions for multivariate data.
probhat
computes nonparametric probability distributions (d, p, q) using
kernel smoothing.
probhat
supports univariate, multivariate and conditional
distributions, and weighted data.
-
Non Parametric distributions :
spd
provides the Semi Parametric Piecewise Distribution, while
fBasics
implements spline smoothed distributions.
-
Hierarchical models:
Distributions whose some parameters
are no longer constant but random according to a particular distribution.
VGAM
provides a lot of hierarchical models: beta/binomial,
beta/geometric and beta/normal distributions.
bayesm
implements: binary logit, linear, multivariate logit and negative binomial
models. Furthermore
LearnBayes
and
MCMCpack
provides poisson/gamma, beta/binomial,
normal/normal and multinomial/Dirichlet models.
-
Unified interface to handle distributions:
-
S3 Object-orientation:
distributions3
provides tools to create and to manipulate
probability distributions using S3.
With
distributions3, generics
random(),
pdf(),
cdf()
and
quantile()
provide replacements for base R's
r/d/p/q
style functions.
-
S4 Object-orientation:
General discrete and continuous distributions are implemented in package
distr
respectively via S4-class DiscreteDistribution and
AbscontDistribution providing the classic d, p, q and r functions.
distrEx
extends available distributions to multivariate and conditional distributions as well
as methods to compute useful statistics (expectation, variance,...) and distances
between distributions (Hellinger, Kolmogorov,... distance). Finally
package
distrMod
provides functions for the computation of minimum
criterion estimators (maximum likelihood and minimum distance estimators). See other
packages of the distr-family (distrSim,
distrTEst,
distrTeach,
distrDoc,
distrEllipse).
-
R6 Object-orientation:
distr6
provides a complete R6 Probability Distributions Interface
for 42 probability distributions and 11 kernels including functionality for
multiple scientific types.
Additionally,
distr6
gives some functionalities for composite
distributions and numerical imputation.
-
Transformation:
Lebesgue decomposition are implemented
in
distr, as well as Convolution, Truncation and Huberization of distributions.
Furthermore,
distr
provides distribution of the maximum or minimum
of two distributions. See Object-orientation above.
-
Transversal functions:
-
Histogram, tail plots, distance estimation:
DistributionUtils
provides log-histogram,
tail plots, functions for testing distributions using inversion tests and the Massart inequality.
visualize
provides functions to plot the pdf or pmf with highlights on area or when probability
is present in user defined locations, as well as the graph is the mean and variance of the distribution.
visualize
provides lower tail, bounded, upper tail, and two tail calculations.
visualize
contains convenience functions for constructing
and plotting bivariate probability distributions (probability mass
functions, probability density functions and cumulative
distribution functions).
vistributions
provides visualization tools for a selected number of
distributions.
-
Parameter estimation:
lmomco
and
Lmoments
focus on
univariate/multivariate (L-)moments estimation.
VGAM
provides a lot of parameter
estimation for usual and "exotic" distributions.
gaussDiff
provides a collection difference measures for
multivariate Gaussian probability density functions
Package
MASS
implements the flexible
fitdistr
function for parameter estimations.
fitdistrplus
greatly enlarges and enhances
the tools to fit any probability distribution.
EnvStats
and
fitteR
also provides tools to fit most common distributions.
flexsurv
and
msm
provides a quantile
function for a generic distribution based on numerical
computation based on a dichotomic search.