gd              package:hyperdirichlet              R Documentation

_T_h_e _D_i_r_i_c_h_l_e_t _a_n_d _g_e_n_e_r_a_l_i_z_e_d _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:

     Specify a Dirichlet or generalized Dirichlet distribution as a
     special case of the hyperdirichlet distribution

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

     dirichlet(params, powers, pnames)
     is.dirichlet(x)
     dirichlet_params(x)
     dirichlet_params(x) <- value
     gd(a, b, b0 = 0, pnames = NULL)

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

params,powers: Numeric vectors (supply exactly one) specifying the
          parameters or the powers respectively of the Dirichlet
          distribution

       x: Object of class hyperdirichlet

   value: Numeric vector

     a,b: Numeric vectors of the same length specifying the parameters
          of the generalized Dirichlet distribution

      b0: Arbitrary constant for the generalized Dirichlet distribution

  pnames: Character vector for name of the hyperdirichlet object

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

     Function 'dirichlet()' returns the hyperdirichlet distribution
     corresponding to the classical Dirichlet distribution.  If the
     vector 'params|powers' is a named vector, then the hyperdirichlet
     object inherits the names (but the names are ignored if argument
     'pnames' is supplied).

     Function 'is.dirichlet(x)' returns 'TRUE' or 'FALSE' according to
     whether the hyperdirichlet object 'x' is a Dirichlet distribution.

     Function 'dirichlet_params()' returns the Dirichlet parameters of
     a hyperdirichlet object.

     Function 'gd()' returns the hyperdicichlet distribution
     corresponding to the generalized Dirichlet distribution of Connor
     and Mosimann.

     For convenience,  the generalized Dirchlet distribution described
     here.  Connor and Mosimann 1969 give the PDF as

                    ommitted...see a LaTeXed file

     where p_1+...+p_k=1 and b_0 is arbitrary.  If b_{i-1}=a_i+b_i for
     i=2,...,k-1 then the PDF reduces to a standard Dirichlet
     distribution with alpha_i=a_i for i=1,...,k-1 and alpha_k=b_{k-1}. 

     Wong 1998 gives the algebraically equivalent form

                    ommitted...see a LaTeXed file

     for x_1+...+x_k <= 1 and x_j >= 0 for j=1,2,...,k and
     gamma_j=beta_j-beta_{j+1} for j=1,2,...,k-1 and
     gamma_k=beta_{k-1}.  

     Here, B(x,y)=G(x)G(y)/G(x+y) is the beta function.

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

     Functions 'dirichlet()' and 'gd()' return a hyperdirichlet object;
     function 'is.dirichlet()' returns a logical; and function
     'dirichlet_params()' returns a numeric vector.

_N_o_t_e:

     These functions have cheaply evaluated analytic expressions for
     the normalizing constant.

     If a hyperdirichlet object corresponds to a Dirichlet
     distribution, this is relatively easy to detect [using
     'is.dirichlet()']. However, the corresponding case for the
     generalized Dirichlet distribution is not yet coded up, owing to
     the non-neutrality of the GD.

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

     Robin K. S. Hankin

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


        *  R. J. Connor and J. E. Mosimann 1969.  _Concepts of
           independence for proportions with a generalization of the
           Dirichlet distribution_.  Journal of the American
           Statistical Association, volume 64, number 325, pp194-206

        *  T-T Wong 1998. _Generalized Dirichlet distribution in
           Bayesian analysis_.  Applied Mathematics and Computation,
           volume 97, pp165-181

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

     'justpairs'

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

     a <- dirichlet(1:4 , pnames=letters[1:4])
     is.dirichlet(a)  # should be TRUE
     dirichlet(dirichlet_params(a)) # should be 'a'

     gd(1:5,5:1)

