Lemma1                package:NPBayes                R Documentation

_C_o_n_d_i_t_i_o_n_a_l _e_x_p_e_c_t_a_t_i_o_n _w_i_t_h _r_e_s_p_e_c_t _t_o _a _D_i_r_i_c_h_l_e_t _p_r_o_c_e_s_s _p_r_i_o_r,
_g_i_v_e_n _r_i_g_h_t _c_e_n_s_o_r_e_d _d_a_t_a.

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

     This function will compute the expectation of  prod P[a_i, infty) 
     with respect to the Dirichlet process prior.

     This is the expectation described in Lemma 1 of Zhou (2001), or
     Zhou (2004).

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

     Lemma1(B, theta, ai, zi = numeric(0))

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

       B: a positive number. The parameter for Dirichlet process prior,
           the weight of prior information. If B is very small, then
          the resulting Dirichlet process prior is ``non-informative". 

   theta: a positive number. Another parameter for Dirichlet process
          prior.  The measure/parameter is  alpha [t, infty ) = B exp(
          - theta t) . 

      ai: vector holding the right censored observations. 

      zi: optional vector holding the uncensored observations. 

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

     The Dirichlet process prior has a parameter  alpha, which is a
     measure on the positive line. We took this measure alpha as alpha
     [t, infty) = B exp ( theta t ) +  sum I[t <=q z_i <=q infty).

     The observations must all be non-negative.

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

     a single value that is  the expectation.

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

     Mai Zhou.

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

     Susarla and Van Ryzin (1976) Nonparametric Bayesian estimation of
     survival curves from incomplete observations. _ J. Amer. Statist.
     Assoc._ *71*,  897-902.

     Zhou, M. (2001). Nonparametric Bayes estimator of survival
     functions for doubly/interval censored data. Tech Report, Univ. of
     Kentucky.  

     See also Zhou, M. (2004). Statistica Sinica.

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

     uncensored <- c(1,5,9)
     rightcensored <- c(4,7)
     NPBayes(B=12, theta=0.2, u=3.2, uncen=uncensored, rightcen=rightcensored)

     leftpt <- 0
     rightpt <- 3
     NPBayes(B=12, theta=0.2, u=3.2, uncen=uncensored, rightcen=rightcensored, 
     lefts = leftpt, rights = rightpt)

