Density, distribution, quantile and random generation functions for the hypoexponential distribution with parameters shape and rate.
Arguments
- x, q
vector of quantiles.
- shape
(
numeric(1))
shape parameter- rate
an alternative way to specify the scale.
- lower.tail
logical; if
TRUE(default), probabilities are \(P[X < x]\), otherwise, \(P[X \ge x]\) (exceptionally not cadlag here, to ensure, e.g.,pgamma(0, shape=0)remains zero).- p
vector of probabilities.
Value
dhypogives the density.phypogives the distribution function.qhypogives the quantile function.rhypogives the random generation.
Examples
dhypo(1:10, shape = 2)
#> [1] 0.3678794412 0.2706705665 0.1493612051 0.0732625556 0.0336897350
#> [6] 0.0148725131 0.0063831738 0.0026837010 0.0011106882 0.0004539993
dhypo(1:10, shape = 2, rate = c(1, 2))
#> [1] 4.650883e-01 2.340393e-01 9.461663e-02 3.596035e-02 1.338509e-02
#> [6] 4.945216e-03 1.822101e-03 6.707002e-04 2.467891e-04 9.079574e-05
phypo(0.75, shape = 2)
#> [1] 0.1733585
phypo(0.75, shape = 2, rate = c(1, 2))
#> [1] 0.2783971
phypo(0.75, shape = 2, rate = c(1, 2), lower.tail = FALSE)
#> [1] 0.7216029
qhypo(0.75, shape = 2)
#> [1] 2.692635
qhypo(0.75, shape = 2, rate = c(1, 2))
#> [1] 2.010105
qhypo(0.75, shape = 2, rate = c(1, 2), lower.tail = FALSE)
#> [1] 0.6931472
rhypo(10, shape = 2)
#> [1] 1.0827773 3.7110874 0.8243757 3.3930504 1.6994250 1.9843131 3.4253901
#> [8] 0.7189091 1.5508627 0.8891985
rhypo(10, shape = 2, rate = c(1, 2))
#> [1] 1.2761199 0.8565597 2.3733588 0.9115878 0.5887387 0.2432596 0.2491712
#> [8] 3.6403717 2.3080628 0.5125376
