Dirichlet              package:MCMCpack              R Documentation

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

     Density function and random generation from the Dirichlet
     distribution.

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

     ddirichlet(x, alpha)
     rdirichlet(n, alpha)

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

       x: A vector containing a single deviate or matrix containing one
          random deviate per row.

       n: Number of random vectors to generate. 

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

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

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

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

     'ddirichlet' gives the density. '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 15 Dec
     2000.

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

     'Beta'

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

       density <- ddirichlet(c(.1,.2,.7), c(1,1,1))
       draws <- rdirichlet(20, c(1,1,1) )

