Last chance! 50% off unlimited learning
Sale ends in
scale
,
and parameters d
and k
.dgengamma.stacy(x, scale = 1, d = 1, k = 1, log = FALSE)
pgengamma.stacy(q, scale = 1, d = 1, k = 1,
lower.tail = TRUE, log.p = FALSE)
qgengamma.stacy(p, scale = 1, d = 1, k = 1,
lower.tail = TRUE, log.p = FALSE)
rgengamma.stacy(n, scale = 1, d = 1, k = 1)
runif
.log = TRUE
then the logarithm of the density is returned.dgengamma.stacy
gives the density,
pgengamma.stacy
gives the distribution function,
qgengamma.stacy
gives the quantile function, and
rgengamma.stacy
generates random deviates.gengamma.stacy
, the n
, all the above arguments may be vectors and
are recyled to the appropriate length if necessary.gengamma.stacy
.x <- seq(0, 14, by = 0.01); d <- 1.5; Scale <- 2; k <- 6
plot(x, dgengamma.stacy(x, Scale, d = d, k = k), type = "l", col = "blue", ylim = 0:1,
main = "Blue is density, orange is cumulative distribution function",
sub = "Purple are 5,10,...,95 percentiles", las = 1, ylab = "")
abline(h = 0, col = "blue", lty = 2)
lines(qgengamma.stacy(seq(0.05, 0.95, by = 0.05), Scale, d = d, k = k),
dgengamma.stacy(qgengamma.stacy(seq(0.05,0.95,by = 0.05), Scale, d = d, k = k),
Scale, d = d, k = k), col = "purple", lty = 3, type = "h")
lines(x, pgengamma.stacy(x, Scale, d = d, k = k), type = "l", col = "orange")
abline(h = 0, lty = 2)
Run the code above in your browser using DataLab