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

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

     Density, cumulative distribution function, quantile function and
     random generation for  the Nakagami distribution.

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

     dnaka(x, shape, scale=1)
     pnaka(q, shape, scale=1)
     qnaka(p, shape, scale=1, ...)
     rnaka(n, shape, scale=1, Smallno=1.0e-6)

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

    x, q: vector of quantiles.

       p: vector of probabilities.

       n: number of observations. Must be a positive integer of length
          1.

shape, scale : arguments for the parameters of the distribution. See
          'nakagami' for more details. For 'rnaka', arguments 'shape'
          and 'scale' must be of length 1.

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

     ...: Arguments that can be passed into 'uniroot'.

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

     See 'nakagami' for more details.

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

     'dnaka' gives the density, 'pnaka' gives the cumulative
     distribution function, 'qnaka' gives the quantile function, and
     'rnaka' generates random deviates.

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

     T. W. Yee

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

     'nakagami'.

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

     ## Not run: 
     x = seq(0, 3.2, len=200)
     plot(x, dgamma(x, shape=1), type="n", col="black", ylab="",
          ylim=c(0,1.5), main="dnaka(x, shape)")
     lines(x, dnaka(x, shape=1), col="red")
     lines(x, dnaka(x, shape=2), col="blue")
     lines(x, dnaka(x, shape=3), col="green")
     legend(2, 1.0, col=c("red","blue","green"), lty=rep(1, len=3),
            legend=paste("shape =", c(1, 2, 3)))

     plot(x, pnorm(x), type="n", col="black", ylab="",
          ylim=0:1, main="pnaka(x, shape)")
     lines(x, pnaka(x, shape=1), col="red")
     lines(x, pnaka(x, shape=2), col="blue")
     lines(x, pnaka(x, shape=3), col="green")
     legend(2, 0.6, col=c("red","blue","green"), lty=rep(1, len=3),
            legend=paste("shape =", c(1, 2, 3)))
     ## End(Not run)

     probs = seq(0.1, 0.9, by=0.1)
     pnaka(qnaka(p=probs, shape=2), shape=2) - probs  # Should be all 0

