Compute the autocorrelation time of a chain
Description
Computes the autocorrelation time of an MCMC chain using an AR model with order chosen by AIC.
Usage
1 
Arguments
Y 
A matrix or vector containing the states of a stationary Markov chain. If a matrix, each row is a single state. 
true.mean 
A vector containing the true mean of 
Details
This function fits an AR(p) model to each component of the chain with states Y using the YuleWalker method to estimate the coefficients and AIC to estimate p. Let pi be the vector of estimated AR coefficients for column i, and let rho be the sample autocorrelation function to lag p. Then, the autocorrelation time of the component is estimated as:
tau = (1pi^T rho)/(1sum(pi))^2
For more discussion of this formula and its associated confidence intervals, see Thompson (2010).
The returned autocorrelation time (and associated confidence interval) are the maxima over the columns of Y.
Callers may want to remove a burnin period from a sample before
passing it to ar.act
.
Value
A list with elements:

act: the estimated autocorrelation time of the slowestmixing column of Y.

se: the standard error of act.

act.025, act.975: a nominal 95% confidence interval for act. Since the interval is asymmetric about act, the standard error is not sufficient to generate these.

order: The order of the AR model selected (p).
References
Thompson, M. B. (2010). Graphical comparison of MCMC performance. http://arxiv.org/abs/1011.4457.
See Also
compare.samplers
,
ar.yw
,
CODA::effectiveSize
,
CODA::spectrum0.ar