pert {mc2d} | R Documentation |
Density, distribution function, quantile function and random generation for the pert distribution with minimum equal to min, mode equal to mode and maximum equal to max.
dpert(x, min=-1, mode=0, max=1, shape=4, log=FALSE) ppert(q, min=-1, mode=0, max=1, shape=4, lower.tail=TRUE, log.p=FALSE) qpert(p, min=-1, mode=0, max=1, shape=4, lower.tail=TRUE, log.p=FALSE) rpert(n, min=-1, mode=0, max=1, shape=4)
x,q |
Vector of quantiles. |
p |
Vector of probabilities. |
n |
Number of observations. If length(n) > 1, the length is taken to be the number required. |
min |
Vector of minima. |
mode |
Vector of modes. |
max |
Vector of maxima. |
shape |
Vector of scaling parameters. |
log, log.p |
Logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
Logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x]. |
The Pert distribution is a special case of the Beta distribution specified by the following parameters. Given:
mu = (min + max + shape * mode)/(shape + 2)
the values of shape1 and shape2 are
shape1=(mu - min)*(2 mode-min-max)/((mode-mu)*(max - min)
shape2=shape1*(max - mu)/(mu - min)
on the domain [min, max].
If mu=mode, shape1 is set to 1+shape/2.
dpert gives the density, ppert gives the distribution function, qpert gives the quantile function, and rpert generates random deviates.
Regis Pouillot
Vose D. Risk Analysis - A Quantitative Guide (John Wiley & Sons, 2000).
curve(dpert(x, min=3, mode=5, max=10, shape=6), from = 2, to = 11, lty=3) curve(dpert(x, min=3, mode=5, max=10), from = 2, to = 11, add=TRUE) curve(dpert(x, min=3, mode=5, max=10, shape=2), from = 2, to = 11, add=TRUE, lty=2) legend(x = 8, y = 2, c("Default", "shape:2", "shape:6"), lty=1:3)