logff                  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:

     Estimating the parameter of the logarithmic distribution.

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

     logff(link = "logit", init.c = NULL)

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

    link: Parameter link function applied to the parameter c, which
          lies between 0 and 1. See 'Links' for more choices.

  init.c: Optional initial value for the c parameter. If given, it
          often pays to start with a larger value, e.g., 0.95. The
          default is to choose an initial value internally.

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

     The logarithmic distribution is based on the logarithmic series,
     and is scaled to a probability function. Its probability function
     is f(y) = a * c^y / y, for y=1,2,3,..., where 0 < c < 1, and a =
     -1 / log(1-c). The mean is a*c/(1-c) (returned as the fitted
     values) and variance is a*c*(1-a*c)/(1-c)^2.

_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 function 'log' computes the natural logarithm. In the 'VGAM'
     library, a link function with option 'loge' corresponds to this.

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

     T. W. Yee

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

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

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

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

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

     'rlog', 'log', 'loge', 'logoff'.

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

     y = rlog(n=1000, prob=logit(0.2, inverse=TRUE))
     fit = vglm(y ~ 1, logff, trace=TRUE, crit="c")
     coef(fit, matrix=TRUE)
     Coef(fit)
     ## Not run: 
     hist(y, prob=TRUE, breaks=seq(0.5, max(y)+0.5, by=1))
     x = seq(1, max(y), by=1)
     lines(x, dlog(x, Coef(fit)[1]), col="red", type="h")
     ## End(Not run)

