zetaff                 package:VGAM                 R Documentation

_Z_e_t_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:

     Estimates the parameter of the zeta distribution.

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

     zetaff(link = "loge", earg=list(), init.p = NULL)

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

    link: Parameter link function applied to the (positive) parameter
          p. See 'Links' for more choices. Choosing 'loglog' constrains
          p>1, but may fail if the maximum likelihood estimate is less
          than one.

    earg: List. Extra argument for the link. See 'earg' in 'Links' for
          general information.

  init.p: Optional initial value for the parameter p. The default is to
          choose an initial value internally. If converge failure
          occurs use this argument to input a value.

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

     In this long tailed distribution  the response must be a positive
     integer. The probability function for a response Y is

            P(Y=y) = 1/(y^(p+1) zeta(p+1)), p>0, y=1,2,...

     where zeta is Riemann's zeta function. The parameter p is
     positive, therefore a log link is the default. The mean of Y is mu
     = zeta(p)/zeta(p+1) provided p>1. The variance of Y is zeta(p-1) /
     zeta(p+1) - mu^2 provided p>2.

     It appears that good initial values are needed for successful
     convergence. If convergence is not obtained, try several values
     ranging from values near 0 to values about 10 or more.

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

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

_N_o_t_e:

     The 'zeta' function may be used to compute values of the zeta
     function.

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

     T. W. Yee

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

     pp.465-471, Chapter 11 of Johnson N. L., Kotz S., and Kemp A. W.
     (1993) _Univariate Discrete Distributions_, 2nd ed. New York:
     Wiley.

     Knight, K. (2000) _Mathematical Statistics_.  Boca Raton: Chapman
     & Hall/CRC Press.

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

     'zeta', 'dzeta', 'hzeta', 'zipf'.

     Documentation accompanying the 'VGAM' package at <URL:
     http://www.stat.auckland.ac.nz/~yee> contains further information
     and examples.

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

     y = 1:5     # Knight, p.304
     w =  c(63, 14, 5, 1, 2)
     fit = vglm(y ~ 1, zetaff, trace=TRUE, wei=w, crit="c")
     (phat = Coef(fit)) # 1.682557
     cbind(dzeta(y, phat) * sum(w), w)

     weighted.mean(y, w)
     fitted(fit, mat=FALSE)
     predict(fit)

     # MLE should satisfy the following:
     mean(log(rep(y, w))) + zeta(1+phat, deriv=1)/zeta(1+phat) # Should be 0

