Description Usage Arguments Details Value Author(s) References See Also Examples
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.
1 2 3 4 |
x,q |
vector of quantiles. |
p |
vector of probabilities. |
a |
lower limit of the distribution. |
b |
upper limit of the distribution. |
c |
mode of the distribution. |
n |
number of observations. If |
logbase |
the base of the logarithm to use. |
All probabilities are lower tailed probabilties.
a, b, and c may be appropriate length vectors except in
the case of rtriangle.
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.
Rob Carnell
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.
1 2 3 4 5 6 7 | ## view the distribution
tri <- rltriangle(100000, 1, 100, 10)
hist(log10(tri), breaks=100, main="Triangle Distribution", xlab="x")
dltriangle(10, 1, 100, 10) # 2/(log10(b)-log10(a)) = 1
qltriangle(pltriangle(10)) # 10
|
[1] 1
[1] 10
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.