Closed Gabriel-p closed 5 years ago
It corresponds to the term 1/(N-tau)
in the definition of the autocovariance function c_f(tau)
, however, instead of using N-tau
(which would yield an unbiased but unconsistent estimator of the autocovariance), N
is used (which gives a consistent but biased estimator; N
in the fft is 2*n
, I have no clue about the other 2 factor though, I think it should be 2*n
, not 4*n
). The typical reference when using this biased estimator of the covariance is Geyer, C. J. (1992). Practical markov chain monte carlo. Statistical science, 473-483.
However, this factor is irrelevant when the autocovariance is normalized in order to get the autocorrelation (the normalization is done in acf /= acf[0]
). Therefore, as the code in master only calculates the autocorrelation, there is no need for this factor 4*n
or 2*n
.
Thank you @OriolAbril. Since this is a very minor issue with the docs and you've provided an answer (although the misery of the 4
is still there), I'll just close this.
In the autocorrelation section of the
latest
docs (https://emcee.readthedocs.io/en/latest/tutorials/autocorr/) there is aautocorr_func_1d()
function defined where the lineis included.
What is the meaning of this line? I could not find it in the
integrated_time()
function in the master branch, and I can't understand what it is supposed to do there.