levy                  package:VGAM                  R Documentation

_L_e_v_y _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 two parameters of the Levy distribution by maximum
     likelihood estimation.

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

     levy(delta = NULL, link.gamma = "loge", earg=list(),
          idelta = NULL, igamma = NULL)

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

   delta: Location parameter. May be assigned a known value, otherwise
          it is estimated (the default).

link.gamma: Parameter link function for the (positive) gamma parameter.
           See 'Links' for more choices.

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

  idelta: Initial value for the delta parameter (if it is to be
          estimated). By default, an initial value is chosen
          internally.

  igamma: Initial value for the gamma parameter. By default, an initial
          value is chosen internally.

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

     The Levy distribution is one of three stable distributions whose
     density function has a tractable form.  The formula for the
     density is

 f(y;gamma,delta) = sqrt(gamma / (2 pi)) exp( -gamma / (2(y - delta))) / (y - delta)^{3/2}

     where delta<y<Inf and gamma>0. The mean does not exist.

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

     If delta is given, then only one parameter is estimated and the
     default is eta1=log(gamma).  If delta is not given, then
     eta2=delta.

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

     T. W. Yee

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

     Nolan, J. P. (2005) _Stable Distributions: Models for Heavy Tailed
     Data_.

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

     The Nolan article is at <URL:
     http://academic2.american.edu/~jpnolan/stable/chap1.pdf>.

     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:

     n = 1000
     mygamma = 1         # log link ==> 0 is the answer
     delta = 0
     y = delta + mygamma / rnorm(n)^2 # This is Levy(mygamma, delta)

     # Cf. Table 1.1 of Nolan for Levy(1,0)
     sum(y > 1) / length(y)  # Should be 0.6827
     sum(y > 2) / length(y)  # Should be 0.5205

     fit = vglm(y ~ 1, levy(delta=delta), trace=TRUE) # 1 parameter
     fit = vglm(y ~ 1, levy(idelta=delta, igamma=mygamma),
                trace=TRUE)    # 2 parameters
     coef(fit, matrix=TRUE)
     Coef(fit)
     summary(fit)
     weights(fit, type="w")[1:4,]

