CPPpost2mcmc             package:BayHaz             R Documentation

_F_u_n_c_t_i_o_n _t_o _C_o_n_v_e_r_t _C_P_P _P_o_s_t_e_r_i_o_r _S_a_m_p_l_e_s _i_n_t_o _M_C_M_C _O_b_j_e_c_t_s

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

     A function to convert a CPP posterior sample into an MCMC object,
     so that package 'coda' can be used for output diagnostics.

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

     CPPpost2mcmc(sampost)

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

 sampost: posterior sample of CPP hazard rates (as generated by
          'CPPpostSample')

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

     An MCMC object, complete with burn-in and thinning information.

_N_o_t_e:

     If package 'coda' is not available, a matrix with meaningful
     column names is returned.

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

     'BayHaz-package', 'CPPpostSample'

_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)
     # load a data set
     data(earthquakes)
     # generate a posterior sample
     post<-CPPpostSample(hypars, times = earthquakes$ti, obs = earthquakes$ob)

     # convert the posterior sample into an MCMC object
     MCMCpost<-CPPpost2mcmc(post)

