gengamma(lscale = "loge", ld = "loge", lk = "loge",
escale = list(), ed = list(), ek = list(),
iscale = NULL, id = NULL, ik = NULL, zero = NULL)
Links
for more choices.earg
in Links
for general information.
"vglmff"
(see vglmff-class
).
The object is used by modelling functions such as vglm
,
and vgam
.There are many special cases, as given in Table 1 of Stacey and Mihram (1965). In the following, the parameters are in the order $b,d,k$. The special cases are: Exponential $f(y;b,1,1)$, Gamma $f(y;b,1,k)$, Weibull $f(y;b,d,1)$, Chi Squared $f(y;2,1,a/2)$ with $a$ degrees of freedom, Chi $f(y;\sqrt{2},2,a/2)$ with $a$ degrees of freedom, Half-normal $f(y;\sqrt{2},2,1/2)$, Circular normal $f(y;\sqrt{2},2,1)$, Spherical normal $f(y;\sqrt{2},2,3/2)$, Rayleigh $f(y;c\sqrt{2},2,1)$ where $c>0$.
Stacy, E. W. and Mihram, G. A. (1965) Parameter estimation for a generalized gamma distribution. Technometrics, 7, 349--358.
Prentice, R. L. (1974) A log gamma model and its maximum likelihood estimation. Biometrika, 61, 539--544.
rgengamma
,
gamma1
,
gamma2
,
prentice74
.k = exp(-1); Scale = exp(1)
gdata = data.frame(y = rgamma(1000, shape = k, scale = Scale))
fit = vglm(y ~ 1, gengamma, gdata, trace = TRUE)
coef(fit, matrix = TRUE)
# Another example
gdata = data.frame(x = runif(nn <- 5000))
gdata = transform(gdata, Scale = exp(1), d = exp(0 + 1.2*x),
k = exp(-1 + 2*x))
gdata = transform(gdata, y = rgengamma(nn, scale = Scale, d = d, k = k))
fit = vglm(y ~ x, gengamma(zero = 1, iscale = 6), gdata, trace = TRUE)
fit = vglm(y ~ x, gengamma(zero = 1), gdata, trace = TRUE, maxit = 50)
coef(fit, matrix = TRUE)
Run the code above in your browser using DataLab