idealToMCMC               package:pscl               R Documentation

_c_o_n_v_e_r_t _a_n _o_b_j_e_c_t _o_f _c_l_a_s_s _i_d_e_a_l _t_o _a _c_o_d_a _M_C_M_C _o_b_j_e_c_t

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

     Converts the x element of an 'ideal' object to an MCMC object, as
     used in the 'coda' package.

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

     idealToMCMC(object, burnin=NULL)

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

  object: an object of class 'ideal'.

  burnin: of the recorded MCMC samples, how many to discard as burnin? 
          Default is 'NULL', in which case the value of 'burnin' in the
          'ideal' object is used.

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

     A 'mcmc' object as used by the 'coda' package, starting at
     iteration 'start', drawn from the 'x' component of the 'ideal'
     object.

_N_o_t_e:

     When specifying a value of 'burnin' different from that used in
     fitting the 'ideal' object, note a distinction between the
     iteration numbers of the stored iterations, and the number of
     stored iterations.  That is, the 'n'-th iteration stored in an
     'ideal' object will not be iteration 'n' if the user specified
     'thin>1' in the call to 'ideal'.  Here, iterations are tagged with
     their iteration number.  Thus, if the user called 'ideal' with
     'thin=10' and 'burnin=100' then the stored iterations are numbered
     '100, 110, 120, ...'.  Any future subsetting via a 'burnin' refers
     to this iteration number.

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

     'ideal', 'mcmc'

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

     data(s109)
     id1 <- ideal(s109,
                  d=1,
                  normalize=TRUE,
                  maxiter=1100,     ## short run for demo purposes
                  burnin=100,
                  thin=10)
     id1coda <- idealToMCMC(id1)
     summary(id1coda)  

