CPPpriorSample            package:BayHaz            R Documentation

_F_u_n_c_t_i_o_n _t_o _S_a_m_p_l_e _H_a_z_a_r_d _R_a_t_e_s _f_r_o_m _C_P_P _P_r_i_o_r_s

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

     A function to generate a random sample of hazard rates from a CPP
     prior distribution.

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

     CPPpriorSample(ss = 1, hyp = CPPpriorElicit())

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

      ss: requested sample size

     hyp: list of hyperparameters (as generated by 'CPPpriorElicit')

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

     A random sample of 'ss' hazard rates is extracted from the CPP
     prior distribution identified by 'hyp'.

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

     A list with four components: 

     hyp: list of hyperparameters identifying the CPP prior
          distribution from which the sample was extracted (copy of the
          input argument)

     sgm: matrix with 'ss' rows (and 'hyp$F' columns) containing the
          CPP jump-times

     xi0: matrix with 'ss' rows (and just one column) containing the
          jump-sizes in the origin

     csi: matrix with 'ss' rows (and 'hyp$F' columns) containing the
          CPP jump-sizes

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

     'CPPevalHR', 'CPPplotHR'

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

     # set RNG seed (for example reproducibility only)
     set.seed(1234)

     # select a CPP prior distribution
     hypars<-CPPpriorElicit(r0 = 0.1, H = 1, T00 = 50, M00 = 2)

     # generate a sample of ten hazard rates
     prior<-CPPpriorSample(ss = 10, hyp = hypars)

