Learn R Programming

rmutil (version 1.1.9)

Simplex: Simplex Distribution

Description

These functions provide information about the simplex distribution with location parameter equal to m and shape equal to s: density, cumulative distribution, quantiles, and random generation.

The simplex distribution has density $$ f(y) = \frac{1}{\sqrt(2\pi\sigma(y(1-y))^3)} \exp(-((y-\mu)/(\mu(1-\mu)))^2/(2y(1-y)\sigma))$$ where \(\mu\) is the location parameter of the distribution and \(\sigma\) is the shape, and \(0<y<1\).

Usage

dsimplex(y, m, s, log=FALSE)
psimplex(q, m, s)
qsimplex(p, m, s)
rsimplex(n, m, s)

Arguments

y

vector of responses.

q

vector of quantiles.

p

vector of probabilities

n

number of values to generate

m

vector of location parameters.

s

vector of shape parameters.

log

if TRUE, log probabilities are supplied.

Author

J.K. Lindsey

See Also

dbeta for the beta distribution and dtwosidedpower for the two-sided power distribution, other distributions for proportions between zero and one.

Examples

Run this code
dsimplex(0.3, 0.5, 1)
psimplex(0.3, 0.5, 1)
qsimplex(0.1, 0.5, 1)
rsimplex(10, 0.5, 1)

Run the code above in your browser using DataLab