Skip to contents

Generic functions for S3 distribution objects

pdf() log_pdf() pmf()
Evaluate the probability density of a probability distribution
cdf()
Evaluate the cumulative distribution function of a probability distribution
random() simulate(<distribution>)
Draw a random sample from a probability distribution
variance() skewness() kurtosis()
Compute the moments of a probability distribution
support()
Return the support of a distribution
is_discrete() is_continuous()
Determine whether a distribution is discrete or continuous
suff_stat()
Compute the sufficient statistics of a distribution from data
fit_mle()
Fit a distribution to data
is_distribution()
Is an object a distribution?
prodist()
Extracting fitted or predicted probability distributions from models
simulate(<default>)
Simulate responses from fitted model objects

Utilities, tools, and data

apply_dpqr() make_support() make_positive_integer()
Utilities for distributions3 objects
log_likelihood() likelihood()
Compute the (log-)likelihood of a probability distribution given data
FIFA2018
Goals scored in all 2018 FIFA World Cup matches

Visualization infrastructure

plot(<distribution>)
Plot the p.m.f, p.d.f or c.d.f. of a univariate distribution
plot_cdf()
Plot the CDF of a distribution
plot_pdf()
Plot the PDF of a distribution
stat_auc() geom_auc()
Fill out area under the curve for a plotted PDF

Bernoulli distribution

Bernoulli()
Create a Bernoulli distribution
cdf(<Bernoulli>)
Evaluate the cumulative distribution function of a Bernoulli distribution
fit_mle(<Bernoulli>)
Fit a Bernoulli distribution to data
pdf(<Bernoulli>) log_pdf(<Bernoulli>)
Evaluate the probability mass function of a Bernoulli distribution
quantile(<Bernoulli>)
Determine quantiles of a Bernoulli distribution
random(<Bernoulli>)
Draw a random sample from a Bernoulli distribution
suff_stat(<Bernoulli>)
Compute the sufficient statistics for a Bernoulli distribution from data
support(<Bernoulli>)
Return the support of the Bernoulli distribution

Beta distribution

Beta()
Create a Beta distribution
cdf(<Beta>)
Evaluate the cumulative distribution function of a Beta distribution
pdf(<Beta>) log_pdf(<Beta>)
Evaluate the probability mass function of a Beta distribution
quantile(<Beta>)
Determine quantiles of a Beta distribution
random(<Beta>)
Draw a random sample from a Beta distribution
support(<Beta>)
Return the support of the Beta distribution

Binomial distribution

Binomial()
Create a Binomial distribution
cdf(<Binomial>)
Evaluate the cumulative distribution function of a Binomial distribution
fit_mle(<Binomial>)
Fit a Binomial distribution to data
pdf(<Binomial>) log_pdf(<Binomial>)
Evaluate the probability mass function of a Binomial distribution
quantile(<Binomial>)
Determine quantiles of a Binomial distribution
random(<Binomial>)
Draw a random sample from a Binomial distribution
suff_stat(<Binomial>)
Compute the sufficient statistics for the Binomial distribution from data
support(<Binomial>)
Return the support of the Binomial distribution

Categorical distribution

Categorical()
Create a Categorical distribution
cdf(<Categorical>)
Evaluate the cumulative distribution function of a Categorical distribution
pdf(<Categorical>) log_pdf(<Categorical>)
Evaluate the probability mass function of a Categorical discrete distribution
quantile(<Categorical>)
Determine quantiles of a Categorical discrete distribution
random(<Categorical>)
Draw a random sample from a Categorical distribution

Cauchy distribution

Cauchy()
Create a Cauchy distribution
cdf(<Cauchy>)
Evaluate the cumulative distribution function of a Cauchy distribution
pdf(<Cauchy>) log_pdf(<Cauchy>)
Evaluate the probability mass function of a Cauchy distribution
quantile(<Cauchy>)
Determine quantiles of a Cauchy distribution
random(<Cauchy>)
Draw a random sample from a Cauchy distribution
support(<Cauchy>)
Return the support of the Cauchy distribution

Chi-square distribution

ChiSquare()
Create a Chi-Square distribution
cdf(<ChiSquare>)
Evaluate the cumulative distribution function of a chi square distribution
pdf(<ChiSquare>) log_pdf(<ChiSquare>)
Evaluate the probability mass function of a chi square distribution
quantile(<ChiSquare>)
Determine quantiles of a chi square distribution
random(<ChiSquare>)
Draw a random sample from a chi square distribution
support(<ChiSquare>)
Return the support of the ChiSquare distribution

Erlang distribution

Erlang()
Create an Erlang distribution
cdf(<Erlang>)
Evaluate the cumulative distribution function of an Erlang distribution
pdf(<Erlang>) log_pdf(<Erlang>)
Evaluate the probability mass function of an Erlang distribution
quantile(<Erlang>)
Determine quantiles of an Erlang distribution
random(<Erlang>)
Draw a random sample from an Erlang distribution
support(<Erlang>)
Return the support of the Erlang distribution

Exponential distribution

Exponential()
Create an Exponential distribution
cdf(<Exponential>)
Evaluate the cumulative distribution function of an Exponential distribution
fit_mle(<Exponential>)
Fit an Exponential distribution to data
pdf(<Exponential>) log_pdf(<Exponential>)
Evaluate the probability density function of an Exponential distribution
quantile(<Exponential>)
Determine quantiles of an Exponential distribution
random(<Exponential>)
Draw a random sample from an Exponential distribution
suff_stat(<Exponential>)
Compute the sufficient statistics of an Exponential distribution from data
support(<Exponential>)
Return the support of the Exponential distribution

Fisher F distribution

FisherF()
Create an F distribution
cdf(<FisherF>)
Evaluate the cumulative distribution function of an F distribution
pdf(<FisherF>) log_pdf(<FisherF>)
Evaluate the probability mass function of an F distribution
quantile(<FisherF>)
Determine quantiles of an F distribution
random(<FisherF>)
Draw a random sample from an F distribution
support(<FisherF>)
Return the support of the FisherF distribution

Frechet distribution

Frechet()
Create a Frechet distribution
cdf(<Frechet>)
Evaluate the cumulative distribution function of a Frechet distribution
pdf(<Frechet>) log_pdf(<Frechet>)
Evaluate the probability mass function of a Frechet distribution
quantile(<Frechet>)
Determine quantiles of a Frechet distribution
random(<Frechet>)
Draw a random sample from a Frechet distribution
support(<Frechet>)
Return the support of the Frechet distribution

Generalized extreme value (GEV) distribution

GEV()
Create a Generalised Extreme Value (GEV) distribution
cdf(<GEV>)
Evaluate the cumulative distribution function of a GEV distribution
pdf(<GEV>) log_pdf(<GEV>)
Evaluate the probability mass function of a GEV distribution
quantile(<GEV>)
Determine quantiles of a GEV distribution
random(<GEV>)
Draw a random sample from a GEV distribution
support(<GEV>)
Return the support of a GEV distribution

Generalized Pareto (GP) distribution

GP()
Create a Generalised Pareto (GP) distribution
cdf(<GP>)
Evaluate the cumulative distribution function of a GP distribution
pdf(<GP>) log_pdf(<GP>)
Evaluate the probability mass function of a GP distribution
quantile(<GP>)
Determine quantiles of a GP distribution
random(<GP>)
Draw a random sample from a GP distribution
support(<GP>)
Return the support of the GP distribution

Gamma distribution

Gamma()
Create a Gamma distribution
cdf(<Gamma>)
Evaluate the cumulative distribution function of a Gamma distribution
fit_mle(<Gamma>)
Fit a Gamma distribution to data
pdf(<Gamma>) log_pdf(<Gamma>)
Evaluate the probability mass function of a Gamma distribution
quantile(<Gamma>)
Determine quantiles of a Gamma distribution
random(<Gamma>)
Draw a random sample from a Gamma distribution
suff_stat(<Gamma>)
Compute the sufficient statistics for a Gamma distribution from data
support(<Gamma>)
Return the support of the Gamma distribution

Geometric distribution

Geometric()
Create a Geometric distribution
cdf(<Geometric>)
Evaluate the cumulative distribution function of a Geometric distribution
fit_mle(<Geometric>)
Fit a Geometric distribution to data
pdf(<Geometric>) log_pdf(<Geometric>)
Evaluate the probability mass function of a Geometric distribution
quantile(<Geometric>)
Determine quantiles of a Geometric distribution
random(<Geometric>)
Draw a random sample from a Geometric distribution
suff_stat(<Geometric>)
Compute the sufficient statistics for the Geometric distribution from data
support(<Geometric>)
Return the support of the Geometric distribution

Gumbel distribution

Gumbel()
Create a Gumbel distribution
cdf(<Gumbel>)
Evaluate the cumulative distribution function of a Gumbel distribution
pdf(<Gumbel>) log_pdf(<Gumbel>)
Evaluate the probability mass function of a Gumbel distribution
quantile(<Gumbel>)
Determine quantiles of a Gumbel distribution
random(<Gumbel>)
Draw a random sample from a Gumbel distribution
support(<Gumbel>)
Return the support of the Gumbel distribution

Hurdle negative binomial distribution

dhnbinom() phnbinom() qhnbinom() rhnbinom()
The hurdle negative binomial distribution
HurdleNegativeBinomial()
Create a hurdle negative binomial distribution
cdf(<HurdleNegativeBinomial>)
Evaluate the cumulative distribution function of a hurdle negative binomial distribution
pdf(<HurdleNegativeBinomial>) log_pdf(<HurdleNegativeBinomial>)
Evaluate the probability mass function of a hurdle negative binomial distribution
quantile(<HurdleNegativeBinomial>)
Determine quantiles of a hurdle negative binomial distribution
random(<HurdleNegativeBinomial>)
Draw a random sample from a hurdle negative binomial distribution
support(<HurdleNegativeBinomial>)
Return the support of the hurdle negative binomial distribution

Hurdle Poisson distribution

dhpois() phpois() qhpois() rhpois()
The hurdle Poisson distribution
HurdlePoisson()
Create a hurdle Poisson distribution
cdf(<HurdlePoisson>)
Evaluate the cumulative distribution function of a hurdle Poisson distribution
pdf(<HurdlePoisson>) log_pdf(<HurdlePoisson>)
Evaluate the probability mass function of a hurdle Poisson distribution
quantile(<HurdlePoisson>)
Determine quantiles of a hurdle Poisson distribution
random(<HurdlePoisson>)
Draw a random sample from a hurdle Poisson distribution
support(<HurdlePoisson>)
Return the support of the hurdle Poisson distribution

Hypergeometric distribution

HyperGeometric()
Create a HyperGeometric distribution
cdf(<HyperGeometric>)
Evaluate the cumulative distribution function of a HyperGeometric distribution
pdf(<HyperGeometric>) log_pdf(<HyperGeometric>)
Evaluate the probability mass function of a HyperGeometric distribution
quantile(<HyperGeometric>)
Determine quantiles of a HyperGeometric distribution
random(<HyperGeometric>)
Draw a random sample from a HyperGeometric distribution
support(<HyperGeometric>)
Return the support of the HyperGeometric distribution

Log-normal distribution

LogNormal()
Create a LogNormal distribution
cdf(<LogNormal>)
Evaluate the cumulative distribution function of a LogNormal distribution
fit_mle(<LogNormal>)
Fit a Log Normal distribution to data
pdf(<LogNormal>) log_pdf(<LogNormal>)
Evaluate the probability mass function of a LogNormal distribution
quantile(<LogNormal>)
Determine quantiles of a LogNormal distribution
random(<LogNormal>)
Draw a random sample from a LogNormal distribution
suff_stat(<LogNormal>)
Compute the sufficient statistics for a Log-normal distribution from data
support(<LogNormal>)
Return the support of the LogNormal distribution

Logistic distribution

Logistic()
Create a Logistic distribution
cdf(<Logistic>)
Evaluate the cumulative distribution function of a Logistic distribution
pdf(<Logistic>) log_pdf(<Logistic>)
Evaluate the probability mass function of a Logistic distribution
quantile(<Logistic>)
Determine quantiles of a Logistic distribution
random(<Logistic>)
Draw a random sample from a Logistic distribution
support(<Logistic>)
Return the support of the Logistic distribution

Multinomial distribution

Multinomial()
Create a Multinomial distribution
pdf(<Multinomial>) log_pdf(<Multinomial>)
Evaluate the probability mass function of a Multinomial distribution
random(<Multinomial>)
Draw a random sample from a Multinomial distribution

Negative binomial distribution

NegativeBinomial()
Create a negative binomial distribution
cdf(<NegativeBinomial>)
Evaluate the cumulative distribution function of a negative binomial distribution
pdf(<NegativeBinomial>) log_pdf(<NegativeBinomial>)
Evaluate the probability mass function of a NegativeBinomial distribution
quantile(<NegativeBinomial>)
Determine quantiles of a NegativeBinomial distribution
random(<NegativeBinomial>)
Draw a random sample from a negative binomial distribution
support(<NegativeBinomial>)
Return the support of the NegativeBinomial distribution

Normal distribution

Normal()
Create a Normal distribution
cdf(<Normal>)
Evaluate the cumulative distribution function of a Normal distribution
fit_mle(<Normal>)
Fit a Normal distribution to data
pdf(<Normal>) log_pdf(<Normal>)
Evaluate the probability mass function of a Normal distribution
quantile(<Normal>)
Determine quantiles of a Normal distribution
random(<Normal>)
Draw a random sample from a Normal distribution
suff_stat(<Normal>)
Compute the sufficient statistics for a Normal distribution from data
support(<Normal>)
Return the support of the Normal distribution

Poisson distribution

Poisson()
Create a Poisson distribution
cdf(<Poisson>)
Evaluate the cumulative distribution function of a Poisson distribution
fit_mle(<Poisson>)
Fit an Poisson distribution to data
pdf(<Poisson>) log_pdf(<Poisson>)
Evaluate the probability mass function of a Poisson distribution
quantile(<Poisson>)
Determine quantiles of a Poisson distribution
random(<Poisson>)
Draw a random sample from a Poisson distribution
suff_stat(<Poisson>)
Compute the sufficient statistics of an Poisson distribution from data
support(<Poisson>)
Return the support of the Poisson distribution

PoissonBinomial distribution

PoissonBinomial()
Create a Poisson binomial distribution
cdf(<PoissonBinomial>)
Evaluate the cumulative distribution function of a PoissonBinomial distribution
pdf(<PoissonBinomial>) log_pdf(<PoissonBinomial>)
Evaluate the probability mass function of a PoissonBinomial distribution
quantile(<PoissonBinomial>)
Determine quantiles of a PoissonBinomial distribution
random(<PoissonBinomial>)
Draw a random sample from a PoissonBinomial distribution
support(<PoissonBinomial>)
Return the support of the PoissonBinomial distribution

Reversed Weibull distribution

RevWeibull()
Create a reversed Weibull distribution
cdf(<RevWeibull>)
Evaluate the cumulative distribution function of an RevWeibull distribution
pdf(<RevWeibull>) log_pdf(<RevWeibull>)
Evaluate the probability mass function of an RevWeibull distribution
quantile(<RevWeibull>)
Determine quantiles of a RevWeibull distribution
random(<RevWeibull>)
Draw a random sample from an RevWeibull distribution
support(<RevWeibull>)
Return the support of the RevWeibull distribution

Student’s T distribution

StudentsT()
Create a Student's T distribution
cdf(<StudentsT>)
Evaluate the cumulative distribution function of a StudentsT distribution
pdf(<StudentsT>) log_pdf(<StudentsT>)
Evaluate the probability mass function of a StudentsT distribution
quantile(<StudentsT>)
Determine quantiles of a StudentsT distribution
random(<StudentsT>)
Draw a random sample from a StudentsT distribution
support(<StudentsT>)
Return the support of the StudentsT distribution

Tukey distribution

Tukey()
Create a Tukey distribution
cdf(<Tukey>)
Evaluate the cumulative distribution function of a Tukey distribution
quantile(<Tukey>)
Determine quantiles of a Tukey distribution
random(<Tukey>)
Draw a random sample from a Tukey distribution
support(<Tukey>)
Return the support of the Tukey distribution

Uniform distribution

Uniform()
Create a Continuous Uniform distribution
cdf(<Uniform>)
Evaluate the cumulative distribution function of a continuous Uniform distribution
pdf(<Uniform>) log_pdf(<Uniform>)
Evaluate the probability mass function of a continuous Uniform distribution
quantile(<Uniform>)
Determine quantiles of a continuous Uniform distribution
random(<Uniform>)
Draw a random sample from a continuous Uniform distribution
support(<Uniform>)
Return the support of the Uniform distribution

Weibull distribution

Weibull()
Create a Weibull distribution
cdf(<Weibull>)
Evaluate the cumulative distribution function of a Weibull distribution
pdf(<Weibull>) log_pdf(<Weibull>)
Evaluate the probability mass function of a Weibull distribution
quantile(<Weibull>)
Determine quantiles of a Weibull distribution
random(<Weibull>)
Draw a random sample from a Weibull distribution
support(<Weibull>)
Return the support of the Weibull distribution

Zero-inflated negative binomial distribution

dzinbinom() pzinbinom() qzinbinom() rzinbinom()
The zero-inflated negative binomial distribution
ZINegativeBinomial()
Create a zero-inflated negative binomial distribution
cdf(<ZINegativeBinomial>)
Evaluate the cumulative distribution function of a zero-inflated negative binomial distribution
pdf(<ZINegativeBinomial>) log_pdf(<ZINegativeBinomial>)
Evaluate the probability mass function of a zero-inflated negative binomial distribution
quantile(<ZINegativeBinomial>)
Determine quantiles of a zero-inflated negative binomial distribution
random(<ZINegativeBinomial>)
Draw a random sample from a zero-inflated negative binomial distribution
support(<ZINegativeBinomial>)
Return the support of the zero-inflated negative binomial distribution

Zero-inflated Poisson distribution

dzipois() pzipois() qzipois() rzipois()
The zero-inflated Poisson distribution
ZIPoisson()
Create a zero-inflated Poisson distribution
cdf(<ZIPoisson>)
Evaluate the cumulative distribution function of a zero-inflated Poisson distribution
pdf(<ZIPoisson>) log_pdf(<ZIPoisson>)
Evaluate the probability mass function of a zero-inflated Poisson distribution
quantile(<ZIPoisson>)
Determine quantiles of a zero-inflated Poisson distribution
random(<ZIPoisson>)
Draw a random sample from a zero-inflated Poisson distribution
support(<ZIPoisson>)
Return the support of the zero-inflated Poisson distribution

Zero-truncated negative binomial distribution

dztnbinom() pztnbinom() qztnbinom() rztnbinom()
The zero-truncated negative binomial distribution
ZTNegativeBinomial()
Create a zero-truncated negative binomial distribution
cdf(<ZTNegativeBinomial>)
Evaluate the cumulative distribution function of a zero-truncated negative binomial distribution
pdf(<ZTNegativeBinomial>) log_pdf(<ZTNegativeBinomial>)
Evaluate the probability mass function of a zero-truncated negative binomial distribution
quantile(<ZTNegativeBinomial>)
Determine quantiles of a zero-truncated negative binomial distribution
random(<ZTNegativeBinomial>)
Draw a random sample from a zero-truncated negative binomial distribution
support(<ZTNegativeBinomial>)
Return the support of the zero-truncated negative binomial distribution

Zero-truncated Poisson distribution

dztpois() pztpois() qztpois() rztpois()
The zero-truncated Poisson distribution
ZTPoisson()
Create a zero-truncated Poisson distribution
cdf(<ZTPoisson>)
Evaluate the cumulative distribution function of a zero-truncated Poisson distribution
pdf(<ZTPoisson>) log_pdf(<ZTPoisson>)
Evaluate the probability mass function of a zero-truncated Poisson distribution
quantile(<ZTPoisson>)
Determine quantiles of a zero-truncated Poisson distribution
random(<ZTPoisson>)
Draw a random sample from a zero-truncated Poisson distribution
support(<ZTPoisson>)
Return the support of the zero-truncated Poisson distribution