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] 0.4012368 0.8040166 0.2945731 4.2924239 1.8912957 0.8239756 3.6207310
#> [8] 0.7300902 0.6926275 0.7906260
rhypo(10, shape = 2, rate = c(1, 2))
#> [1] 2.5165786 1.1710231 0.2520009 0.5403438 2.0752860 0.6105865 1.0777397
#> [8] 0.7228366 1.4876788 0.4501569
