Hzeta                  package:VGAM                  R Documentation

_H_a_i_g_h_t'_s _Z_e_t_a _F_u_n_c_t_i_o_n

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

     Density, distribution function, quantile function and random
     generation for Haight's Zeta function distribution with parameter
     'alpha'.

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

     dhzeta(x, alpha)
     phzeta(q, alpha)
     qhzeta(p, alpha)
     rhzeta(n, alpha)

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

    x, q: Vector of quantiles. For the density, it should be a vector
          with positive integer values in order for the probabilities
          to be positive.

       p: vector of probabilities.

       n: number of observations. A single positive integer.

   alpha: The parameter value. Must contain positive values and is
          recycled to the length of 'x' or 'p' or 'q' if necessary.

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

     The probability function is

              f(x) = (2x-1)^(-alpha) - (2x+1)^(-alpha),

     where alpha>0 and x=1,2,....

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

     'dhzeta' gives the density, 'phzeta' gives the distribution
     function, 'qhzeta' gives the quantile function, and 'rhzeta'
     generates random deviates.

_N_o_t_e:

     Given some response data, the 'VGAM' family function 'hzeta'
     estimates the parameter 'alpha'.

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

     T. W. Yee

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

     Page 470 of Johnson N. L., Kotz S. and Kemp, A. W. (1993)
     _Univariate Discrete Distributions_, 2nd edition, Volume 2, New
     York: Wiley.

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

     'hzeta', 'zeta', 'zetaff'.

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

     dhzeta(1:20, 0.5)
     rhzeta(20, 0.5)

     round(1000 * dhzeta(1:8, 2))
     table(rhzeta(1000, 2))

     ## Not run: 
     alpha = 0.5; x = 1:10
     plot(x, dhzeta(x, alpha=alpha), type="h", ylim=0:1,
          sub="alpha=0.5", las=1, col="blue", ylab="Probability",
          main="Haight's zeta: blue=density; red=distribution function")
     lines(x+0.1, phzeta(x, alpha=alpha), col="red", lty=3, type="h")
     ## End(Not run)

