

autocorr(coda)                               R Documentation

_A_u_t_o_c_o_r_r_e_l_a_t_i_o_n _f_u_n_c_t_i_o_n _f_o_r _M_a_r_k_o_v _c_h_a_i_n_s

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

     `autocorr' calculates the autocorrelation function for
     the Markov chain `mcmc.obj' at the lags given by
     `lags'.  The lag values are taken to be relative to the
     thinning interval if `relative=TRUE'.

     High autocorrelations within chains indicate slow mix-
     ing and, usually, slow convergence. It may be useful to
     thin out a chain with high autocorrelations before cal-
     culating summary statistics: a thinned chain may con-
     tain most of the information, but take up less space in
     memory. Re-running the MCMC sampler with a different
     parameterization may help to reduce autocorrelation.

_U_s_a_g_e_:

     autocorr(mcmc.obj, lags = c(0, 1, 5, 10, 50), relative=TRUE

_V_a_l_u_e_:

     A vector or array containing the autocorrelations.

_A_u_t_h_o_r_(_s_)_:

     Martyn Plummer

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

     `acf', `autocorr.plot'

