rdirichlet             package:MCMCpack             R Documentation

_G_e_n_e_r_a_t_e _R_a_n_d_o_m _D_r_a_w_s _f_r_o_m _t_h_e _D_i_r_i_c_h_l_e_t _D_i_s_t_r_i_b_u_t_i_o_n

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

     Generate random deviates from the Dirichlet distribution.

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

     rdirichlet(n, alpha)

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

       n: Number of random vectors to generate. 

   alpha: Vector of shape parameters, or matrix of shape parameters
          corresponding to draw.

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

     The Dirichlet distribution is the multidimensional generalization
     of the beta distribution.

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

     'rdirichlet' returns a matrix with 'n' rows, each containing a
     single Dirichlet random deviate.

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

     Code is taken from Greg's Miscellaneous Functions (gregmisc).  His
     code was based on code posted by Ben Bolker to R-News on Fri Dec
     15 2000.

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

     'Beta', 'ddirichlet'

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

       x <- rdirichlet(20, c(1,1,1) )

