Density, distribution function, quantile function, and random generation for
the Standardized Bradford Distribuction with parameter equal to c, which must
be greater than 0. dbradford
gives the density, pbradford
gives the distribution function,
qbradford
gives the quantile function and rnorm
generates random numbers
from the distribution.
dbradford(x, c = 5, log = FALSE) pbradford(q, c = 5, lower.tail = TRUE, log.p = FALSE) qbradford(p, c = 5, lower.tail = TRUE, log.p = FALSE) rbradford(n, c = 5)
x, q | A vector of quantiles. Must be between 0 and 1. |
---|---|
c | The parameter of the standardized bradford distribution. Must be greater than 0. |
log, log.p | logical; if TRUE, probabilities p are given as log(p) |
lower.tail | logical; if TRUE (default), probabilities are given as P(x<=X); otherwise, P(x > X). |
p | A vector of probabilities. |
n | number of observations. If |
The main definition for for the Standardized Bradford Function was taken from
SciPy.
The rbradford
function is defined using the Inverse Transform Sampling Method,
with a more in depth explanation presented in the package's vignettes. All functions
were built to work like the probability functions in the{stats}
package.
A numeric vector.
If c is not specified, it assumes the default value of 5. The Standardized Bradford Distribution has density defined as $$f(x;c) = \frac{c}{log(1+c) log(1+ cx)}$$ for \(c > 0\) and \(0 \leq x \leq 1\).
#> [1] 0.44921431 0.15698560 0.02080869 0.09485555 0.26153071 0.38826027 #> [7] 0.79429637 0.06103814 0.01713073 0.20847441# What value satisfies P(X <= x) = 0.5 when c=13? qbradford(p=0.5, c=13)#> [1] 0.2108967# Probability of P(X <=0.5) when c=10 pbradford(q=0.5, c=10)#> [1] 0.7472217# Density function of x=0.375 when c=100 dbradford(x=0.375, c=100)#> [1] 0.5628028