prentice74.RdEstimation of a 3-parameter log-gamma distribution described by Prentice (1974).
Parameter link function applied to the
location parameter \(a\),
positive scale parameter \(b\)
and the shape parameter \(q\), respectively.
See Links for more choices.
Initial value for \(a\) and \(b\), respectively. The defaults mean an initial value is determined internally for each.
Initial value for \(q\). If failure to converge occurs, try some other value. The default means an initial value is determined internally.
See CommonVGAMffArguments for information.
See CommonVGAMffArguments for information.
The probability density function is given by
$$f(y;a,b,q) = |q|\,\exp(w/q^2 - e^w) / (b \, \Gamma(1/q^2)),$$
for shape parameter \(q \ne 0\),
positive scale parameter \(b > 0\),
location parameter \(a\),
and all real \(y\).
Here, \(w = (y-a)q/b+\psi(1/q^2)\)
where \(\psi\) is the digamma function,
digamma.
The mean of \(Y\) is \(a\) (returned as the fitted values).
This is a different parameterization compared to lgamma3.
Special cases: \(q = 0\) is the normal distribution with standard deviation \(b\), \(q = -1\) is the extreme value distribution for maximums, \(q = 1\) is the extreme value distribution for minima (Weibull). If \(q > 0\) then the distribution is left skew, else \(q < 0\) is right skew.
An object of class "vglmff" (see vglmff-class).
The object is used by modelling functions such as vglm,
and vgam.
Prentice, R. L. (1974). A log gamma model and its maximum likelihood estimation. Biometrika, 61, 539–544.
The special case \(q = 0\) is not handled, therefore estimates of \(q\) too close to zero may cause numerical problems.
The notation used here differs from Prentice (1974): \(\alpha = a\), \(\sigma = b\). Fisher scoring is used.
pdata <- data.frame(x2 = runif(nn <- 1000))
pdata <- transform(pdata, loc = -1 + 2*x2, Scale = exp(1))
pdata <- transform(pdata, y = rlgamma(nn, loc = loc, scale = Scale, shape = 1))
fit <- vglm(y ~ x2, prentice74(zero = 2:3), data = pdata, trace = TRUE)
#> Iteration 1: loglikelihood = -2586.3162
#> Iteration 2: loglikelihood = -2584.6452
#> Iteration 3: loglikelihood = -2584.6286
#> Iteration 4: loglikelihood = -2584.6285
#> Iteration 5: loglikelihood = -2584.6285
coef(fit, matrix = TRUE) # Note the coefficients for location
#> location loglink(scale) shape
#> (Intercept) -2.777286 1.010882 0.9879914
#> x2 2.200447 0.000000 0.0000000