Log                   package:VGAM                   R Documentation

_L_o_g_a_r_i_t_h_m_i_c _D_i_s_t_r_i_b_u_t_i_o_n

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

     Density, distribution function, and random generation for the
     logarithmic distribution.

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

     dlog(x, prob)
     plog(q, prob, log.p=FALSE)
     rlog(n, prob, Smallno=1.0e-6)

_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.

       n: number of observations. A single positive integer.

    prob: The parameter value c described in in 'logff'. Here it is
          called 'prob' because 0<c<1 is the range. For 'rlog()' this
          parameter must be of length 1.

   log.p: Logical. If 'TRUE' then all probabilities 'p' are given as
          'log(p)'.

 Smallno: Numeric, a small value used by the rejection method for
          determining the upper limit of the distribution. That is,
          'plog(U, prob) > 1-Smallno' where 'U' is the upper limit.

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

     The details are given in 'logff'.

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

     'dlog' gives the density, 'plog' gives the distribution function,
     and 'rlog' generates random deviates.

_N_o_t_e:

     Given some response data, the 'VGAM' family function 'logff'
     estimates the parameter 'prob'.

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

     T. W. Yee

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

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

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

     'logff'.

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

     dlog(1:20, 0.5)
     rlog(20, 0.5)

     ## Not run: 
     prob = 0.8; x = 1:10
     plot(x, dlog(x, prob=prob), type="h", ylim=0:1,
          sub="prob=0.8", las=1, col="blue", ylab="Probability",
          main="Logarithmic distribution: blue=density; red=distribution function")
     lines(x+0.1, plog(x, prob=prob), col="red", lty=3, type="h")
     ## End(Not run)

