These functions provide information about the triangle distribution on the
logarithmic interval from a
to b
with a maximum at c
. dltriangle
gives the density, pltriangle
gives the distribution function,
qltriangle
gives the quantile function, and rltriangle
generates
n
random deviates.
rltriangle(
n = 1,
a = 1,
b = 100,
c = 10^((log10(a) + log10(b))/2),
logbase = 10
)
dltriangle(x, a = 1, b = 100, c = 10^((log10(a) + log10(b))/2), logbase = 10)
pltriangle(q, a = 1, b = 100, c = 10^((log10(a) + log10(b))/2), logbase = 10)
qltriangle(p, a = 1, b = 100, c = 10^((log10(a) + log10(b))/2), logbase = 10)
number of observations. If length(n) > 1
, the length is taken to be the number required.
lower limit of the distribution.
upper limit of the distribution.
mode of the distribution.
the base of the logarithmic scale to use (default to 10)
vector of quantiles.
vector of probabilities.
dltriangle
gives the density, pltriangle
gives the
distribution function, qltriangle
gives the quantile function, and
rltraingle
generates random deviates. Invalid arguments will
result in return value NaN
or NA
.
All probabilities are lower tailed probabilties. a
,
b
, and c
may be appropriate length vectors except in the
case of rtriangle
.
Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) The New S Language. Wadsworth & Brooks/Cole.
.Random.seed
about random number generation,
runif
, etc for other distributions.