Calculate the triangular density function value.
Arguments
- x
numeric. A vector of values.
- min
numeric. The support minimum.
- max
numeric. The support maximum.
- mode
numeric. The mode (argmax) of the density function.
Examples
if (FALSE) {
x <- c(0.2, 0.5, -2, 1.5, NA)
dtri(x, min = 0, max = 1, mode = 0.5)
}