DPelicit              package:DPpackage              R Documentation

_P_e_r_f_o_r_m_s _a _p_r_i_o_r _e_l_i_c_i_t_a_t_i_o_n _f_o_r _t_h_e _p_r_e_c_i_s_i_o_n _p_a_r_a_m_e_t_e_r _o_f _a _D_P _p_r_i_o_r

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

     This function performs a prior elicitation for the precision
     parameter of a DP prior. The function calculates: 

     1) the expected value and the standard deviation of the number of
     clusters,  given the values of the parameters of the 'gamma' 
     prior for the precision parameter, 'a0' and 'b0', or

     2) the value of the parameters 'a0' and 'b0' of the 'gamma' prior
     distribution for the precision parameter, 'alpha', given the prior
     expected number and the  standard deviation of the number of
     clusters.

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

     DPelicit(n,method='JGL',a0=NULL,b0=NULL,mean=NULL,std=NULL)

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

       n: number of observations which distribution follows a DP prior.

  method: the method to be used. See 'details'.

      a0: hyperparameter for the 'Gamma' prior distribution of  the
          precision parameter of the Dirichlet process prior, 'alpha ~
          Gamma(a0,b0)'.  

      b0: hyperparameter for the 'Gamma' prior distribution of  the
          precision parameter of the Dirichlet process prior, alpha ~
          Gamma(a0,b0).  

    mean: prior expected number of clusters when  alpha ~ Gamma(a0,b0).

     std: prior standard deviation for the number of clusters  when
          alpha ~ Gamma(a0,b0).

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

     The methods supported by these functions are based on the fact
     that a priori 'E(alpha) = a0/b0' and 'Var(alpha) = a0/b0^2', and
     an additional  approximation based on Taylor series expansion.

     The default method, '"JGL"', is based on the exact value of the
     mean and  the variance of the number of clusters given the
     precision parameter  alpha (see, Jara, Garcia-Zatera and Lesaffre,
     2007).

     The Method '"KMQ"' is base on the Liu (1996) approximation to  the
     expected value and the variance of the number of clusters given
     the precision parameter alpha (see, Kottas, Muller and Quintana,
     2005).

     Given the prior judgement for the mean and variance of the number
     of  clusters, the equations are numerically solve for 'a0' and
     'b0'.  With this objective, the Newton-Raphson algorithm and the
     forward-difference  approximation to Jacobian are used.

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

     Alejandro Jara <Alejandro.JaraVallejos@med.kuleuven.be>

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

     Jara, A., Garcia-Zattera, M.J., Lesaffre, E. (2007) A Dirichlet
     Process mixture model for  the analysis of correlated binary
     responses. Computational Statistics and  Data Analysis 51:
     5402-5415.

     Kottas, A., Muller, P., Quintana, F. (2005) Nonparametric Bayesian
     modeling for multivariate ordinal data, Journal of Computational
     and Graphical Statistics 14: 610-625.

     Liu, J.S. (1996) Nonparametric Hierarchical Bayes via Sequential
     Imputations, The Annals  of Statistics, 24: 911-930.

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

         # Calculate the expected value and the standard deviation
         # for the number of cluster given alpha ~ Gamma(a0,b0).

           DPelicit(200,a0=2.01,b0=2.01,method="JGL")
           DPelicit(200,a0=2.01,b0=2.01,method="KMQ")

         # Calculate the values of a0 and b0, given the expected value 
         # and the standard deviation of the number of clusters

           DPelicit(200,mean=3.1,std=2.7,method="JGL")
           DPelicit(200,mean=3.1,std=2.7,method="KMQ")

