Triangular: Create a Triangular distribution

View source: R/Triangular.R

TriangularR Documentation

Create a Triangular distribution

Description

Create a Triangular distribution

Usage

Triangular(a = 0, b = 1, c = 0.5)

Arguments

a

The a parameter (lower bound). 'a' can be any value in the set of real numbers. Defaults to '0'.

b

The b parameter (upper bound). 'b' can be any value in the set of real numbers. It should be strictly bigger than 'a'. Defaults to '1'.

c

The c parameter (peak). 'c' can be any value in the set of real numbers. It should be strictly between 'a' and 'b'. Defaults to '0.5'.

Value

A 'Triangular' object.

See Also

Other continuous distributions: GEVmin2(), GEVmin(), GEV(), GPDmin2(), GPDmin(), GPD(), KDB4(), KDB()

Examples


set.seed(27)

X <- Triangular(a=0,b=4,c=1)
X

random(X, 10)

pdf(X, 0.7)
log_pdf(X, 0.7)

cdf(X, 0.7)
quantile(X, 0.7)

cdf(X, quantile(X, 0.7))
quantile(X, cdf(X, 0.7))

benRenard/disTRIMbution documentation built on July 1, 2023, 4:24 a.m.