erlang                 package:VGAM                 R Documentation

_E_r_l_a_n_g _D_i_s_t_r_i_b_u_t_i_o_n

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

     Estimates the scale parameter of the Erlang distribution by
     maximum likelihood estimation.

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

     erlang(shape.arg, link = "loge", method.init = 1)

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

shape.arg: The shape parameter. The user must specify a positive
          integer.

    link: Link function applied to the (positive) scale parameter. See
          'Links' for more choices.

method.init: An integer with value '1' or '2' which specifies the
          initialization method. If failure to converge occurs try the
          other value.

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

     The Erlang distribution is a special case of the gamma
     distribution with _shape_ that is a positive integer.  If
     'shape.arg=1' then it simplifies to the exponential distribution.
     As illustrated in the example below, the Erlang distribution is
     the distribution of the sum of 'shape.arg' independent and
     identically distributed exponential random variates.

     The probability density function of the Erlang distribution is
     given by

   f(y) =  exp(-y/scale) y^(shape-1) scale^(-shape) / gamma(shape)

     for known positive integer shape, unknown scale > 0  and y > 0.
     Here,  gamma(shape) is the gamma function, as in 'gamma'. The mean
     of _Y_ is mu=shape*scale and its variance is shape*scale^2. The
     linear/additive predictor, by default, is eta=log(scale).

_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 'rate' parameter found in 'gamma2.ab' is '1/scale' here-see
     also 'rgamma'.

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

     T. W. Yee

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

     Most standard texts on statistical distributions describe this
     distribution, e.g.,

     Evans, M., Hastings, N. and Peacock, B. (2000) _Statistical
     Distributions_, New York: Wiley-Interscience, Third edition.

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

     'gamma2.ab', 'exponential'.

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

     n = 200; rate = 8
     y = rep(0, n)
     for(i in 1:3)
         y = y + rexp(n, rate=rate)
     fit = vglm(y ~ 1, erlang(shape=3), trace=TRUE) 
     coef(fit, matrix=TRUE)
     Coef(fit) # Answer = 1/rate
     1/rate
     summary(fit)

