nakagami                package:VGAM                R Documentation

_N_a_k_a_g_a_m_i _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:

     Estimation of the two parameters of the Nakagami distribution by
     maximum likelihood estimation.

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

     nakagami(lshape = "loge", lscale = "loge",
              eshape=list(), escale=list(), ishape = NULL, iscale = 1)

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

lshape, lscale: Parameter link function applied to the _shape_ and
          _scale_ parameters. Log links ensure they are positive. See
          'Links' for more choices.

eshape, escale: List. Extra argument for each of the links. See 'earg'
          in 'Links' for general information.

ishape, iscale: Optional initial values for the shape and scale
          parameters. For 'ishape', a 'NULL' value means it is obtained
          in the 'initialize' slot based on the value of 'iscale'. For
          'iscale', assigning a 'NULL' means a value is obtained in the
          'initialize' slot, however, setting another numerical value
          is recommended if convergence fails or is too slow.

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

     The Nakagami distribution, which is useful for modelling wireless
     systems such as radio links, can be written

 2 * (shape/scale)^shape * y^(2*shape-1) * exp(-shape*y^2/scale) / gamma(shape)

     for y > 0, shape > 0, scale > 0. The mean of Y is
     sqrt(scale/shape) * gamma(shape+0.5) / gamma(shape) and these are
     returned as the fitted values. By default, the linear/additive
     predictors are eta1=log(shape) and eta2=log(scale).   Fisher
     scoring is implemented.

_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 Nakagami distribution is also known as the Nakagami-_m_
     distribution, where m=shape here. Special cases: m=0.5 is a
     one-sided Gaussian distribution and m=1 is a Rayleigh
     distribution. The second moment is E(Y^2)=m.

     If Y has a Nakagami distribution with parameters _shape_ and
     _scale_ then Y^2 has a gamma distribution with shape parameter
     _shape_ and scale parameter _scale/shape_.

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

     T. W. Yee

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

     Nakagami, M. (1960) The  _m_-distribution: a general  formula  of
     intensity  distribution  of  rapid  fading, pp.3-36 in:
     _Statistical Methods in Radio Wave Propagation_. W. C. Hoffman,
     Ed., New York: Pergamon.

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

     'rnaka', 'gamma2', 'rayleigh'.

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

     n = 1000; shape = exp(0); Scale = exp(1)
     y = sqrt(rgamma(n, shape=shape, scale=Scale/shape))
     fit = vglm(y ~ 1, nakagami, trace=TRUE, crit="c")
     y = rnaka(n, shape=shape, scale=Scale)
     fit = vglm(y ~ 1, nakagami(iscale=3), trace=TRUE)
     fitted(fit)[1:5]
     mean(y)
     coef(fit, matrix=TRUE)
     (Cfit = Coef(fit))
     ## Not run: 
     hist(sy <- sort(y), prob=TRUE, main="", xlab="y", ylim=c(0,0.6))
     lines(sy, dnaka(sy, shape=Cfit[1], scale=Cfit[2]), col="red")
     ## End(Not run)

