Free Access Week - Data Engineering + BI
Data Engineering and BI courses are free this week!
Free Access Week - Jun 2-8

survstan (version 0.0.7.1)

ggstacy: The Generalized Gamma Distribution (Stacy's original parametrization)

Description

Probability function, distribution function, quantile function and random generation for the distribution with parameters alpha, gamma and kappa.

Usage

dggstacy(x, alpha, gamma, kappa, log = FALSE)

pggstacy(q, alpha, gamma, kappa, log.p = FALSE, lower.tail = TRUE)

qggstacy( p, alpha = 1, gamma = 1, kappa = 1, log.p = FALSE, lower.tail = TRUE, ... )

rggstacy(n, alpha = 1, gamma = 1, kappa = 1, ...)

Value

dggstacy gives the (log) probability function, pggstacy gives the (log) distribution function, qggstacy gives the quantile function, and rggstacy generates random deviates.

Arguments

x

vector of (non-negative integer) quantiles.

alpha

shape parameter of the distribution (alpha > 0).

gamma

scale parameter of the distribution (gamma > 0).

kappa

shape parameter of the distribution (kappa > 0).

log, log.p

logical; if TRUE, probabilities p are given as log(p).

q

vector of quantiles.

lower.tail

logical; if TRUE (default), probabilities are P[Xx]; otherwise, P[X>x].

p

vector of probabilities.

...

further arguments passed to other methods.

n

number of random values to return.

Details

Probability density function: f(x|α,γ,κ)=κγαΓ(α/κ)xα1exp{(xγ)κ}I[0,)(x), for α>0, γ>0 and κ>0.

Distribution function: F(t|α,γ,κ)=FG(x|ν,1), where x=(tγ)κ, and FG(|ν,1) corresponds to the distribution function of a gamma distribution with shape parameter ν=α/γ and scale parameter equals to 1.