Skip to contents

lumen provides density (d), CDF (p), quantile (q), and random-generation (r) functions for several distributions not covered by base R, plus moment (m) functions – mean and variance – for those and for several distributions base R already provides d-p-q-r for. A - marks a combination with no function.

Extreme value distributions

Distributiond-p-q-rMoments
Generic extremedpqr-extreme-
Gen. Extreme Valuedpqr-gevmgev()
Gumbeldpqr-gumbelmgumbel()
Gumbel, maximum of two dpqr-gumbelx-
Fréchetdpqr-frechetmfrechet()
Reverse Weibulldpqr-revweibullmrevweibull()
Reverse Gumbeldpqr-revgumbel mrevgumbel()
Order statisticsdpqr-order-

Order statistics have no quantile function (qorder() does not exist). qrevgumbelExp() is a specialized quantile for the exponential parametrization of the reverse Gumbel distribution, not a general-purpose q slot – use qrevgumbel() for that.

Other distributions

Distributiond-p-q-rMoments
Benforddpqr-benfordmbenford()
Dirichletdpqr-dirichlet-
Gompertzdpqr-gompertz mgompertz()
Gen. Pareto dpqr-gpdmgpd()
Triangulardpqr-trimtri()

Moments for base R distributions

For these, d-p-q-r already exist in stats – lumen only adds the moments function.

Distributiond-p-q-rMoments
BetaBetambeta()
BinomialBinomialmbinom()
Chi-squaredChisquaremchisq()
ExponentialExponentialmexp()
FFDistmf()
GammaGammaDistmgamma()
GeometricGeometricmgeom()
HypergeometricHypergeometric mhyper()
Log-normalLognormalmlnorm()
Negative binomial NegBinomialmnbinom()
NormalNormalmnorm()
PoissonPoissonmpois()
Student's tTDistmt()

Standalone

rsum1() generates a Dirichlet-distributed sample (which sums to 1 by construction), related to but not part of the ddirichlet()/pdirichlet()/qdirichlet()/rdirichlet() suite above.

pAD()/qAD() are the CDF and quantile function of the Anderson-Darling test statistic's null distribution – supporting functions for andersonDarlingTest(), not a distribution family of their own (no d/r counterparts).

See also