

   AAuuttooccoorrrreellaattiioonn ffuunnccttiioonn ffoorr MMaarrkkoovv cchhaaiinnss

        autocorr(mcmc.obj, lags = c(1, 5, 10, 50) * thin(x)

   DDeessccrriippttiioonn::

        `autocorr' calculates the autocorrelation function for
        the Markov chain `mcmc.obj' at the lags given by
        `lags'.  The lag values are absolute, not relative to
        the thinning interval, so they should be a multiple of
        thin(x).

        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.

   VVaalluuee::

        A matrix or array containing the autocorrelations.

   AAuutthhoorr((ss))::

        Martyn Plummer

   SSeeee AAllssoo::

        `acf', `autocorr.plot'

