rnormp                package:normalp                R Documentation

_P_s_e_u_d_o-_r_a_n_d_o_m _n_u_m_b_e_r_s _f_r_o_m _a _N_o_r_m_a_l _o_f _O_r_d_e_r _p _D_i_s_t_r_i_b_u_t_i_o_n

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

     Generation of pseudo-random numbers from a normal of order p
     distribution with location parameter 'mu', scale parameter
     'sigmap' and structure parameter 'p'.

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

     rnormp(n, mu=0, sigmap=1, p=2, method="def")

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

       n: Number of observations.

      mu: Vector of location parameters.

  sigmap: Vector of scale parameters.

       p: Structure parameter.

  method: If is set to the default method "'def'", it uses the method
          based on the transformation of a Gamma random variable. If
          set to "'chiodi'", it uses an algorithm based on a
          generalization of the Marsaglia formula to generate
          pseudo-random numbers from a gaussian distribution. The
          default method "'def'" is faster than the "'chiodi'" one
          (this one is introduced only for "historical" purposes).

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

     If 'mu', 'sigmap' or 'p' are not specified they assume the default
     values 0, 1 and 2, respectively. The normal of order p
     distribution has density function


 f(x) = 1/(2 p^(1/p) Gamma(1+1/p) sigmap) exp{-|x - mu|^p/(p sigmap^p)}


     where mu is the location parameter, sigmap the scale parameter and
     p the structure parameter. When p=2 the Normal of Order p
     Distribution becomes the Normal (Gaussian) Distribution, when p=1
     the Normal of Order p Distribution becomes the Laplace
     Distribution, when p->infinity the Normal of Order p Distribution
     becomes the Uniform Distribution.

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

     'rnormp' gives a vector of n pseudo-random numbers from a normal
     of order p distribution.

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

     Angelo M. Mineo

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

     Chiodi, M. (1986) _Procedures for generating pseudo-random numbers
     from a normal distribution of order p (p>1)_, Statistica
     Applicata, 1, pp. 7-26.

     Marsaglia, G. and Bray, T.A. (1964) _A convenient method for
     generating normal variables_, SIAM rev., 6, pp. 260-264.

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

     'Normal' for the Normal distribution, 'Uniform' for the Uniform
     distribution, 'Special' for the Gamma function and '.Random.seed'
     for the random number generation.

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

     ## Generate a random sample x from a normal of order p distribution
     ## At the end we have the histogram of x
     x <- rnormp(1000, 1, 2, 1.5)
     hist(x, main="Histogram of the random sample")

