lgammaff                package:VGAM                R Documentation

_L_o_g-_g_a_m_m_a _D_i_s_t_r_i_b_u_t_i_o_n _F_a_m_i_l_y _F_u_n_c_t_i_o_n

_D_e_s_c_r_i_p_t_i_o_n:

     Estimation of the parameter of the standard and nonstandard
     log-gamma distribution.

_U_s_a_g_e:

     lgammaff(link = "loge", earg=list(), init.k = NULL)
     lgamma3ff(llocation="identity", lscale="loge", lshape="loge",
               elocation=list(), escale=list(), eshape=list(),
               ilocation=NULL, iscale=NULL, ishape=1, zero=NULL)

_A_r_g_u_m_e_n_t_s:

llocation: Parameter link function applied to the location parameter a.
          See 'Links' for more choices.

  lscale: Parameter link function applied to the positive scale
          parameter b. See 'Links' for more choices.

link, lshape: Parameter link function applied to  the positive shape
          parameter k.  See 'Links' for more choices.

earg, elocation, escale, eshape: List. Extra argument for each of the
          links. See 'earg' in 'Links' for general information.

init.k, ishape: Initial value for k. If given, it must be positive.  If
          failure to converge occurs, try some other value. The default
          means an initial value is determined internally. 

ilocation, iscale: Initial value for a and b. The defaults mean an
          initial value is determined internally for each.

    zero: An integer-valued vector specifying which linear/additive
          predictors are modelled as intercepts only. The values must
          be from the set {1,2,3}. The default value means none are
          modelled as intercept-only terms.

_D_e_t_a_i_l_s:

     The probability density function of the standard log-gamma
     distribution is given by

                  f(y) = exp[ky - exp(y)]/gamma(k),

     for parameter k>0 and all real y. The mean of Y is 'digamma(k)'
     (returned as the fitted values) and its variance is 'trigamma(k)'.

     For the non-standard log-gamma distribution, one replaces y by
     (y-a)/b, where a is the location parameter and b is the positive
     scale parameter. Then the density function is 

          f(y) = exp[k(y-a)/b - exp((y-a)/b)]/(b*gamma(k)).

     The mean and variance of Y are 'a + b*digamma(k)' (returned as the
     fitted values) and 'b^2 * trigamma(k)', respectively.

_V_a_l_u_e:

     An object of class '"vglmff"' (see 'vglmff-class'). The object is
     used by modelling functions such as 'vglm', and 'vgam'.

_N_o_t_e:

     The standard log-gamma distribution can be viewed as a
     generalization of the standard type 1 extreme value density: when
     k=1 the distribution of -Y is the standard type 1 extreme value
     distribution.

     The standard log-gamma distribution is fitted with 'lgammaff' and
     the non-standard (3-parameter) log-gamma distribution is fitted
     with 'lgamma3ff'.

_A_u_t_h_o_r(_s):

     T. W. Yee

_R_e_f_e_r_e_n_c_e_s:

     Kotz, S. and Nadarajah, S. (2000) _Extreme Value Distributions:
     Theory and Applications_, pages 48-49, London: Imperial College
     Press.

     Johnson, N. L. and Kotz, S. and Balakrishnan, N. (1995)
     _Continuous Univariate Distributions_, 2nd edition, Volume 2,
     p.89, New York: Wiley.

_S_e_e _A_l_s_o:

     'rlgamma', 'ggamma', 'prentice74', 'lgamma'.

_E_x_a_m_p_l_e_s:

     y = rlgamma(n <- 100, k=exp(1))
     fit = vglm(y ~ 1, lgammaff, trace=TRUE, crit="c")
     summary(fit)
     coef(fit, matrix=TRUE)
     Coef(fit)

     # Another example
     x = runif(n <- 5000)
     loc = -1 + 2*x
     Scale = exp(1+x)
     y = rlgamma(n, loc=loc, scale=Scale, k=exp(0))
     fit = vglm(y ~ x, lgamma3ff(zero=3), trace=TRUE, crit="c")
     coef(fit, matrix=TRUE)

